diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 9839a45a28a..9d37077ebcc 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -383,6 +383,31 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) return Ok; } +/******************************************************************************* + * GdipGetFontHeight [GDIPLUS.@] + * PARAMS + * font [I] Font to retrieve height from + * graphics [I] The current graphics context + * height [O] Resulting height + * RETURNS + * SUCCESS: Ok + * FAILURE: Another element of GpStatus + * + * NOTES + * Forwards to GdipGetFontHeightGivenDPI + */ +GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font, + GDIPCONST GpGraphics *graphics, REAL *height) +{ + REAL dpi; + + TRACE("%p %p %p\n", font, graphics, height); + + dpi = GetDeviceCaps(graphics->hdc, LOGPIXELSY); + + return GdipGetFontHeightGivenDPI(font, dpi, height); +} + /******************************************************************************* * GdipGetFontHeightGivenDPI [GDIPLUS.@] * PARAMS diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 3766dc1d0d4..95add0d10a2 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -267,7 +267,7 @@ @ stdcall GdipGetFamilyName(ptr ptr long) @ stdcall GdipGetFontCollectionFamilyCount(ptr ptr) @ stdcall GdipGetFontCollectionFamilyList(ptr long ptr ptr) -@ stub GdipGetFontHeight +@ stdcall GdipGetFontHeight(ptr ptr ptr) @ stdcall GdipGetFontHeightGivenDPI(ptr long ptr) @ stdcall GdipGetFontSize(ptr ptr) @ stdcall GdipGetFontStyle(ptr ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 320f02d8f7e..8a1e8f70bd5 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -438,6 +438,8 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*); GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*, INT*); +GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*, GDIPCONST GpGraphics*, + REAL*); GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*); GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,