[Gdiplus 11/16] Stub GdipGetFontHeightGivenDPI
Adam Petaccia
adam at tpetaccia.com
Thu Jul 3 13:26:41 CDT 2008
---
dlls/gdiplus/font.c | 27 +++++++++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 5337c6f..8c7cd90 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -308,6 +308,33 @@ 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)
+ *
+ * See http://msdn.microsoft.com/en-us/library/ms536202(VS.85).aspx
+ */
+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 861810f..0b68dfa 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 e66c7bb..cd64462 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -369,6 +369,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**);
--
1.5.4.3
More information about the wine-patches
mailing list