gdiplus: Ensure GdipGetGenericFontFamilySansSerif returns a truetype font.

This commit is contained in:
Vincent Povirk 2010-04-15 11:40:21 -05:00 committed by Alexandre Julliard
parent d4880b7a1f
commit 049aa8dacd
1 changed files with 10 additions and 4 deletions

View File

@ -829,15 +829,21 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
*/ */
GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily) GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily)
{ {
/* FIXME: On Windows this is called Microsoft Sans Serif, this shouldn't GpStatus stat;
* affect anything */ static const WCHAR MicrosoftSansSerif[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; static const WCHAR Tahoma[] = {'T','a','h','o','m','a','\0'};
TRACE("(%p)\n", nativeFamily); TRACE("(%p)\n", nativeFamily);
if (nativeFamily == NULL) return InvalidParameter; if (nativeFamily == NULL) return InvalidParameter;
return GdipCreateFontFamilyFromName(MSSansSerif, NULL, nativeFamily); stat = GdipCreateFontFamilyFromName(MicrosoftSansSerif, NULL, nativeFamily);
if (stat == FontFamilyNotFound)
/* FIXME: Microsoft Sans Serif is not installed on Wine. */
stat = GdipCreateFontFamilyFromName(Tahoma, NULL, nativeFamily);
return stat;
} }
/***************************************************************************** /*****************************************************************************