Commit d6bad2d6 authored by Adam Petaccia's avatar Adam Petaccia Committed by Alexandre Julliard

gdiplus: Implement GdipGetGeneric*.

parent ce4b4148
...@@ -278,3 +278,68 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily) ...@@ -278,3 +278,68 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
return Ok; return Ok;
} }
/*****************************************************************************
* GdipGetGenericFontFamilyMonospace [GDIPLUS.@]
*
* Obtains a serif family (Courier New on Windows)
*
* PARAMS
* **nativeFamily [I] Where the font will be stored
*
* RETURNS
* InvalidParameter if nativeFamily is NULL.
* Ok otherwise.
*/
GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily)
{
static const WCHAR CourierNew[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'};
if (nativeFamily == NULL) return InvalidParameter;
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);
}
/*****************************************************************************
* 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, this shouldn't
* affect anything */
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);
}
...@@ -272,9 +272,9 @@ ...@@ -272,9 +272,9 @@
@ stub GdipGetFontSize @ stub GdipGetFontSize
@ stub GdipGetFontStyle @ stub GdipGetFontStyle
@ stub GdipGetFontUnit @ stub GdipGetFontUnit
@ stub GdipGetGenericFontFamilyMonospace @ stdcall GdipGetGenericFontFamilyMonospace(ptr)
@ stub GdipGetGenericFontFamilySansSerif @ stdcall GdipGetGenericFontFamilySansSerif(ptr)
@ stub GdipGetGenericFontFamilySerif @ stdcall GdipGetGenericFontFamilySerif(ptr)
@ stub GdipGetHatchBackgroundColor @ stub GdipGetHatchBackgroundColor
@ stub GdipGetHatchForegroundColor @ stub GdipGetHatchForegroundColor
@ stub GdipGetHatchStyle @ stub GdipGetHatchStyle
......
...@@ -353,6 +353,10 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*, ...@@ -353,6 +353,10 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*); GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily*);
GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*, WCHAR*, LANGID); GpStatus WINGDIPAPI GdipGetFamilyName(GDIPCONST GpFontFamily*, WCHAR*, LANGID);
GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily**);
GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily**);
GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily**);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*); GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);
GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*); GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment