[PATCH] 3/4 Implement GdipGetFamilyName
Adam Petaccia
adam at tpetaccia.com
Tue Jun 17 09:56:34 CDT 2008
---
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 c37ab31..4e1d527 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -207,6 +207,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
+ * InvalidParameter if family is NULL
+ * Ok otherwise
+ *
+ * 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[LF_FACESIZE], LANGID language)
+{
+ TRACE("%p, %p, %d\n", family, name, language);
+ if (family == NULL)
+ return InvalidParameter;
+
+ if (language != LANG_NEUTRAL)
+ FIXME("No support for handling of multiple languages!\n");
+
+ lstrcpynW (name, family->FamilyName, LF_FACESIZE);
+
+ return Ok;
+}
+
/*****************************************************************************
* GdipDeleteFontFamily [GDIPLUS.@]
* PARAMS:
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index d07e3fc..4836ca9 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 f5ebafa..dd9ca72 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -346,6 +346,7 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, GpFontCollection *fontCollection, GpFontFamily **FontFamily);
GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily);
+GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily *family, WCHAR name[LF_FACESIZE], LANGID language);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);
--
1.5.4.3
More information about the wine-patches
mailing list