gdiplus: GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel.
This commit is contained in:
parent
74c8117a4b
commit
f5e9a01cce
|
@ -428,14 +428,24 @@ GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
|
|||
*/
|
||||
GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
|
||||
{
|
||||
if (!(font && height)) return InvalidParameter;
|
||||
|
||||
FIXME("%p (%s), %f, %p\n", font,
|
||||
TRACE("%p (%s), %f, %p\n", font,
|
||||
debugstr_w(font->lfw.lfFaceName), dpi, height);
|
||||
|
||||
if (!(font && height)) return InvalidParameter;
|
||||
|
||||
switch (font->unit)
|
||||
{
|
||||
case UnitPixel:
|
||||
*height = font->emSize;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unhandled unit type: %d\n", font->unit);
|
||||
return NotImplemented;
|
||||
}
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Borrowed from GDI32:
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue