Nikolay Sivov : gdiplus: Implemented GdipGetLogFontA.

Alexandre Julliard julliard at winehq.org
Wed Feb 4 09:15:44 CST 2009


Module: wine
Branch: master
Commit: c17266de9e6b2807ebb7b2039950386b386bc5df
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c17266de9e6b2807ebb7b2039950386b386bc5df

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Wed Feb  4 11:57:04 2009 +0300

gdiplus: 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




More information about the wine-cvs mailing list