gdiplus: Use GenericFontFamilySansSerif when missing deserialized font family.
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com> Signed-off-by: Esme Povirk <esme@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fcc21dbf48
commit
a9151e2e2b
|
@ -2440,8 +2440,13 @@ static GpStatus METAFILE_PlaybackObject(GpMetafile *metafile, UINT flags, UINT d
|
|||
|
||||
status = GdipCreateFontFamilyFromName(familyname, NULL, &family);
|
||||
GdipFree(familyname);
|
||||
|
||||
/* If a font family cannot be created from family name, native
|
||||
falls back to a sans serif font. */
|
||||
if (status != Ok)
|
||||
return InvalidParameter;
|
||||
status = GdipGetGenericFontFamilySansSerif(&family);
|
||||
if (status != Ok)
|
||||
return status;
|
||||
|
||||
status = GdipCreateFont(family, data->EmSize, data->FontStyleFlags, data->SizeUnit, (GpFont **)&object);
|
||||
GdipDeleteFontFamily(family);
|
||||
|
|
|
@ -3060,8 +3060,8 @@ static void test_drawdriverstring(void)
|
|||
static const emfplus_record unknownfontdecode_records[] = {
|
||||
{ EMR_HEADER },
|
||||
{ EmfPlusRecordTypeHeader },
|
||||
{ EmfPlusRecordTypeObject, ObjectTypeFont << 8, 0, 1 },
|
||||
{ EmfPlusRecordTypeDrawDriverString, 0x8000, 0, 1 },
|
||||
{ EmfPlusRecordTypeObject, ObjectTypeFont << 8 },
|
||||
{ EmfPlusRecordTypeDrawDriverString, 0x8000 },
|
||||
{ EmfPlusRecordTypeEndOfFile },
|
||||
{ EMR_EOF },
|
||||
{ 0 }
|
||||
|
|
Loading…
Reference in New Issue