gdiplus: Fall back to Liberation Serif if Times New Roman is missing.
This commit is contained in:
parent
ac2063a418
commit
ca5b5d2a05
|
@ -837,12 +837,22 @@ GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamil
|
||||||
GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
|
GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
|
||||||
{
|
{
|
||||||
static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
|
static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
|
||||||
|
static const WCHAR LiberationSerif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f','\0'};
|
||||||
|
GpStatus stat;
|
||||||
|
|
||||||
TRACE("(%p)\n", nativeFamily);
|
TRACE("(%p)\n", nativeFamily);
|
||||||
|
|
||||||
if (nativeFamily == NULL) return InvalidParameter;
|
if (nativeFamily == NULL) return InvalidParameter;
|
||||||
|
|
||||||
return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
|
stat = GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
|
||||||
|
|
||||||
|
if (stat == FontFamilyNotFound)
|
||||||
|
stat = GdipCreateFontFamilyFromName(LiberationSerif, NULL, nativeFamily);
|
||||||
|
|
||||||
|
if (stat == FontFamilyNotFound)
|
||||||
|
ERR("Missing 'Times New Roman' font\n");
|
||||||
|
|
||||||
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue