[Gdiplus try2 09/10] Implement GdipGetLogFontA

Adam Petaccia adam at tpetaccia.com
Wed Aug 27 16:22:17 CDT 2008


---
 dlls/gdiplus/font.c       |   19 +++++++++++++++++++
 dlls/gdiplus/gdiplus.spec |    2 +-
 2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index a5fd5b8..399f2ed 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -356,6 +356,25 @@ GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
 }
 
 /*******************************************************************************
+ * GdipGetLogFontA [GDIPLUS.@]
+ */
+GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics,
+    LOGFONTA *lfa)
+{
+    LOGFONTW lfw;
+
+    /* FIXME: use graphics */
+    if(!(font && graphics && lfa))
+        return InvalidParameter;
+
+    lfw = font->lfw;
+    memcpy(&lfw, lfa, FIELD_OFFSET(LOGFONTA,lfFaceName));
+    MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE);
+
+    return Ok;
+}
+
+/*******************************************************************************
  * GdipGetLogFontW [GDIPLUS.@]
  */
 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 95add0d..15d9745 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -311,7 +311,7 @@
 @ stdcall GdipGetLineSpacing(ptr long ptr)
 @ stub GdipGetLineTransform
 @ stdcall GdipGetLineWrapMode(ptr ptr)
-@ stub GdipGetLogFontA
+@ stdcall GdipGetLogFontA(ptr ptr ptr)
 @ stdcall GdipGetLogFontW(ptr ptr ptr)
 @ stdcall GdipGetMatrixElements(ptr ptr)
 @ stub GdipGetMetafileDownLevelRasterizationLimit
-- 
1.5.4.3




More information about the wine-patches mailing list