Commit a9151e2e authored by Shawn M. Chapla's avatar Shawn M. Chapla Committed by Alexandre Julliard

gdiplus: Use GenericFontFamilySansSerif when missing deserialized font family.

parent fcc21dbf
......@@ -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 }
......
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