gdiplus: GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel.

This commit is contained in:
Adam Petaccia 2008-08-27 17:22:22 -04:00 committed by Alexandre Julliard
parent 74c8117a4b
commit f5e9a01cce
1 changed files with 14 additions and 4 deletions

View File

@ -428,12 +428,22 @@ 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);
return NotImplemented;
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;
}
/***********************************************************************