Module: wine Branch: master Commit: 25e4fd7d3cf557ac937051b979af778e7fe534b8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=25e4fd7d3cf557ac937051b979...
Author: Adam Petaccia adam@tpetaccia.com Date: Thu Jul 3 14:26:41 2008 -0400
gdiplus: Stub GdipGetFontHeightGivenDPI.
---
dlls/gdiplus/font.c | 25 +++++++++++++++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 5337c6f..c7cea81 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -308,6 +308,31 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) return Ok; }
+/******************************************************************************* + * GdipGetFontHeightGivenDPI [GDIPLUS.@] + * PARAMS + * font [I] Font to retrieve DPI from + * dpi [I] DPI to assume + * height [O] Return value + * + * RETURNS + * SUCCESS: Ok + * FAILURE: InvalidParameter if font or height is NULL + * + * NOTES + * According to MSDN, the result is (lineSpacing)*(fontSize / emHeight)*dpi + * (for anything other than unit Pixel) + */ +GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height) +{ + if (!(font && height)) return InvalidParameter; + + FIXME("%p (%s), %f, %p\n)", font, + debugstr_w(font->lfw.lfFaceName), dpi, height); + + return NotImplemented; +} + /* Borrowed from GDI32 */ static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index afd07c4..861b68d 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -268,7 +268,7 @@ @ stub GdipGetFontCollectionFamilyCount @ stub GdipGetFontCollectionFamilyList @ stub GdipGetFontHeight -@ stub GdipGetFontHeightGivenDPI +@ stdcall GdipGetFontHeightGivenDPI(ptr long ptr) @ stdcall GdipGetFontSize(ptr ptr) @ stub GdipGetFontStyle @ stdcall GdipGetFontUnit(ptr ptr) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 5791168..3c8d587 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -372,6 +372,7 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*); GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*); +GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*);
GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*, GpFontCollection*, GpFontFamily**);