Adam Petaccia : gdiplus: GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel.
Alexandre Julliard
julliard at winehq.org
Thu Aug 28 07:00:46 CDT 2008
Module: wine
Branch: master
Commit: f5e9a01cce31d70c7587ba0c476331e3671c88c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5e9a01cce31d70c7587ba0c476331e3671c88c8
Author: Adam Petaccia <adam at tpetaccia.com>
Date: Wed Aug 27 17:22:22 2008 -0400
gdiplus: GdipGetFontHeightGivenDPI: Return a valid value for UnitPixel.
---
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 ef62ccb..3a9d36d 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -428,12 +428,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;
}
/***********************************************************************
More information about the wine-cvs
mailing list