[Gdiplus try2 10/10] GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel
Adam Petaccia
adam at tpetaccia.com
Wed Aug 27 16:22:22 CDT 2008
---
dlls/gdiplus/font.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 399f2ed..802156d 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -447,12 +447,22 @@ GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
*/
GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
{
+ TRACE("%p (%s), %f, %p\n", font,
+ debugstr_w(font->lfw.lfFaceName), dpi, height);
+
if (!(font && height)) return InvalidParameter;
- FIXME("%p (%s), %f, %p\n", font,
- debugstr_w(font->lfw.lfFaceName), dpi, height);
+ switch (font->unit)
+ {
+ case UnitPixel:
+ *height = font->emSize;
+ break;
+ default:
+ FIXME("Unhandled unit type: %d\n", font->unit);
+ return NotImplemented;
+ }
- return NotImplemented;
+ return Ok;
}
/***********************************************************************
--
1.5.4.3
More information about the wine-patches
mailing list