gdiplus: GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel.
This commit is contained in:
parent
74c8117a4b
commit
f5e9a01cce
|
@ -428,12 +428,22 @@ GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
|
||||||
*/
|
*/
|
||||||
GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
|
GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
|
||||||
{
|
{
|
||||||
if (!(font && height)) return InvalidParameter;
|
TRACE("%p (%s), %f, %p\n", font,
|
||||||
|
|
||||||
FIXME("%p (%s), %f, %p\n", font,
|
|
||||||
debugstr_w(font->lfw.lfFaceName), dpi, height);
|
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 NotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue