[PATCH] 3/4 Implement GdipGetGenericFontFamilySansSerif
Adam Petaccia
adam at tpetaccia.com
Tue Jun 17 09:56:38 CDT 2008
---
dlls/gdiplus/font.c | 21 +++++++++++++++++++++
dlls/gdiplus/gdiplus.spec | 2 +-
include/gdiplusflat.h | 1 +
3 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index d5ac6d2..9fb4b76 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -301,3 +301,24 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
}
+/*****************************************************************************
+ * GdipGetGenericFontFamilySansSerif [GDIPLUS.@]
+ * Obtains a serif family (Microsoft Sans Serif on Windows)
+ *
+ * PARAMS:
+ * **nativeFamily [I] Where the font will be stored
+ *
+ * RETURNS:
+ * InvalidParameter if nativeFamily is NULL.
+ * Ok otherwise.
+ */
+GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily)
+{
+ //FIXME On Windows this is called Microsoft Sans Serif
+ static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
+
+ if (nativeFamily == NULL) return InvalidParameter;
+
+ return GdipCreateFontFamilyFromName(MSSansSerif, NULL, nativeFamily);
+}
+
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b87d2fd..951b90b 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -273,7 +273,7 @@
@ stub GdipGetFontStyle
@ stub GdipGetFontUnit
@ stdcall GdipGetGenericFontFamilyMonospace(ptr)
-@ stub GdipGetGenericFontFamilySansSerif
+@ stdcall GdipGetGenericFontFamilySansSerif(ptr)
@ stdcall GdipGetGenericFontFamilySerif(ptr)
@ stub GdipGetHatchBackgroundColor
@ stub GdipGetHatchForegroundColor
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 22ac366..4e3f265 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -348,6 +348,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, GpFontCo
GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily);
GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily *family, WCHAR name[LF_FACESIZE], LANGID language);
+GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily);
GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily);
GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily);
--
1.5.4.3
More information about the wine-patches
mailing list