[PATCH] 2/4 Implement GdipGetGenericFontFamilySerif
Adam Petaccia
adam at tpetaccia.com
Tue Jun 17 09:56:37 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 11443b7..d5ac6d2 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -280,3 +280,24 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamil
return GdipCreateFontFamilyFromName(CourierNew, NULL, nativeFamily);
}
+
+/*****************************************************************************
+ * GdipGetGenericFontFamilySerif [GDIPLUS.@]
+ * Obtains a serif family (Times New Roman on Windows)
+ *
+ * PARAMS:
+ * **nativeFamily [I] Where the font will be stored
+ *
+ * RETURNS:
+ * InvalidParameter if nativeFamily is NULL.
+ * Ok otherwise.
+ */
+GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
+{
+ static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
+
+ if (nativeFamily == NULL) return InvalidParameter;
+
+ return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
+}
+
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index a932ff4..b87d2fd 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -274,7 +274,7 @@
@ stub GdipGetFontUnit
@ stdcall GdipGetGenericFontFamilyMonospace(ptr)
@ stub GdipGetGenericFontFamilySansSerif
-@ stub GdipGetGenericFontFamilySerif
+@ stdcall GdipGetGenericFontFamilySerif(ptr)
@ stub GdipGetHatchBackgroundColor
@ stub GdipGetHatchForegroundColor
@ stub GdipGetHatchStyle
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 5059aaf..22ac366 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 GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily);
GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
--
1.5.4.3
More information about the wine-patches
mailing list