gdi32: Don't load a font replacement if any face of the real family exists.

This commit is contained in:
Huw Davies 2011-08-04 16:15:58 +01:00 committed by Alexandre Julliard
parent e934d847b2
commit 33532613a8
1 changed files with 17 additions and 12 deletions

View File

@ -1613,6 +1613,8 @@ static void LoadReplaceList(void)
/* "NewName"="Oldname" */ /* "NewName"="Oldname" */
WideCharToMultiByte(CP_ACP, 0, value, -1, familyA, sizeof(familyA), NULL, NULL); WideCharToMultiByte(CP_ACP, 0, value, -1, familyA, sizeof(familyA), NULL, NULL);
if(!find_family_from_name(value))
{
/* Find the old family and hence all of the font files /* Find the old family and hence all of the font files
in that family */ in that family */
LIST_FOR_EACH(family_elem_ptr, &font_list) { LIST_FOR_EACH(family_elem_ptr, &font_list) {
@ -1623,11 +1625,14 @@ static void LoadReplaceList(void)
TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName), TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
debugstr_w(face->StyleName), familyA); debugstr_w(face->StyleName), familyA);
/* Now add a new entry with the new family name */ /* Now add a new entry with the new family name */
AddFontToList(face->file, face->font_data_ptr, face->font_data_size, familyA, family->FamilyName, ADDFONT_FORCE_BITMAP | (face->external ? ADDFONT_EXTERNAL_FONT : 0)); AddFontToList(face->file, face->font_data_ptr, face->font_data_size,
familyA, family->FamilyName,
ADDFONT_FORCE_BITMAP | (face->external ? ADDFONT_EXTERNAL_FONT : 0));
} }
break; break;
} }
} }
}
/* reset dlen and vlen */ /* reset dlen and vlen */
dlen = datalen; dlen = datalen;
vlen = valuelen; vlen = valuelen;