Adam Petaccia : gdiplus: Implement GdipGetFamilyName.

Alexandre Julliard julliard at winehq.org
Wed Jun 25 16:44:19 CDT 2008


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

Author: Adam Petaccia <adam at tpetaccia.com>
Date:   Sat Jun 21 13:02:49 2008 -0400

gdiplus: Implement GdipGetFamilyName.

---

 dlls/gdiplus/font.c       |   33 +++++++++++++++++++++++++++++++++
 dlls/gdiplus/gdiplus.spec |    2 +-
 include/gdiplusflat.h     |    1 +
 3 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index ec591c1..f38261d 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -219,6 +219,39 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
     return Ok;
 }
 
+/*******************************************************************************
+ * GdipGetFamilyName [GDIPLUS.@]
+ *
+ * Returns the family name into name
+ *
+ * PARAMS
+ *  *family     [I] Family to retrieve from
+ *  *name       [O] WCHARS of the family name
+ *  LANGID      [I] charset
+ *
+ * RETURNS
+ *  SUCCESS: Ok
+ *  FAILURE: InvalidParameter if family is NULL
+ *
+ * NOTES
+ *   If name is a NULL ptr, then both XP and Vista will crash (so we do as well)
+ */
+GpStatus WINGDIPAPI GdipGetFamilyName (GDIPCONST GpFontFamily *family,
+                                       WCHAR *name, LANGID language)
+{
+    if (family == NULL)
+         return InvalidParameter;
+
+    TRACE("%p, %p, %d\n", family, name, language);
+
+    if (language != LANG_NEUTRAL)
+        FIXME("No support for handling of multiple languages!\n");
+
+    lstrcpynW (name, family->FamilyName, LF_FACESIZE);
+
+    return Ok;
+}
+
 
 /*****************************************************************************
  * GdipDeleteFontFamily [GDIPLUS.@]
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b88298e..0b093a4 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -264,7 +264,7 @@
 @ stub GdipGetEncoderParameterList
 @ stub GdipGetEncoderParameterListSize
 @ stub GdipGetFamily
-@ stub GdipGetFamilyName
+@ stdcall GdipGetFamilyName(ptr ptr long)
 @ stub GdipGetFontCollectionFamilyCount
 @ stub GdipGetFontCollectionFamilyList
 @ stub GdipGetFontHeight
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index cb6ca01..fb4fbfc 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -351,6 +351,7 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
 GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
     GpFontCollection*, GpFontFamily**);
 GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*);
+GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*, WCHAR*, LANGID);
 
 GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
 GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);




More information about the wine-cvs mailing list