[2/2] gdiplus: Implemented GdipGetLogFontA

Nikolay Sivov bunglehead at gmail.com
Wed Feb 4 03:00:48 CST 2009


Changelog:
    - Implemented GdipGetLogFontA

>From 8581947370fabe9444ec7edc413764b3f4d171ea Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 4 Feb 2009 11:57:04 +0300
Subject: Implemented GdipGetLogFontA

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

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 22fd393..94c9381 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -374,6 +374,29 @@ GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
 }
 
 /*******************************************************************************
+ * GdipGetLogFontA [GDIPLUS.@]
+ */
+GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics,
+    LOGFONTA *lfa)
+{
+    GpStatus status;
+    LOGFONTW lfw;
+
+    TRACE("(%p, %p, %p)\n", font, graphics, lfa);
+
+    status = GdipGetLogFontW(font, graphics, &lfw);
+    if(status != Ok)
+        return status;
+
+    memcpy(lfa, &lfw, FIELD_OFFSET(LOGFONTA,lfFaceName) );
+
+    if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
+        return GenericError;
+
+    return Ok;
+}
+
+/*******************************************************************************
  * GdipGetLogFontW [GDIPLUS.@]
  */
 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index ba2b5ab..0037a74 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.6.5






More information about the wine-patches mailing list