diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 97623561990940b4a51fd2067b4b2dfb982cd383..cdfd7f25bbd3e37585e7bacdc623ec16ba5932b2 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -236,6 +236,26 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font) return GdipCreateFontFromLogfontW(hdc, &lfw, font); } +/******************************************************************************* + * GdipGetFontUnit [GDIPLUS.@] + * + * PARAMS + * font [I] Font to retrieve from + * unit [O] Return value + * + * RETURNS + * FAILURE: font or unit was NULL + * OK: otherwise + */ +GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit) +{ + if (!(font && unit)) return InvalidParameter; + + *unit = font->unit; + + return Ok; +} + /* FIXME: use graphics */ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW *lfw) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index f43a63e8c1f780bbc6f5a85b1521db26a6308ce1..9950c0f9c70373fc71ed705aa12fbb72a4c08c01 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -271,7 +271,7 @@ @ stub GdipGetFontHeightGivenDPI @ stub GdipGetFontSize @ stub GdipGetFontStyle -@ stub GdipGetFontUnit +@ stdcall GdipGetFontUnit(ptr ptr) @ stdcall GdipGetGenericFontFamilyMonospace(ptr) @ stdcall GdipGetGenericFontFamilySansSerif(ptr) @ stdcall GdipGetGenericFontFamilySerif(ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index a8caf9bb334bbcaf08a5ea76e2de3af3c4d2fcec..a3a12f3af65fdb0e90d9ff9c112fd3396795888b 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -349,6 +349,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**) GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); +GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*, GpFontCollection*, GpFontFamily**);