Commit 33532613 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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

parent e934d847
...@@ -1613,19 +1613,24 @@ static void LoadReplaceList(void) ...@@ -1613,19 +1613,24 @@ 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);
/* Find the old family and hence all of the font files if(!find_family_from_name(value))
in that family */ {
LIST_FOR_EACH(family_elem_ptr, &font_list) { /* Find the old family and hence all of the font files
family = LIST_ENTRY(family_elem_ptr, Family, entry); in that family */
if(!strcmpiW(family->FamilyName, data)) { LIST_FOR_EACH(family_elem_ptr, &font_list) {
LIST_FOR_EACH(face_elem_ptr, &family->faces) { family = LIST_ENTRY(family_elem_ptr, Family, entry);
face = LIST_ENTRY(face_elem_ptr, Face, entry); if(!strcmpiW(family->FamilyName, data)) {
TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName), LIST_FOR_EACH(face_elem_ptr, &family->faces) {
debugstr_w(face->StyleName), familyA); face = LIST_ENTRY(face_elem_ptr, Face, entry);
/* Now add a new entry with the new family name */ TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
AddFontToList(face->file, face->font_data_ptr, face->font_data_size, familyA, family->FamilyName, ADDFONT_FORCE_BITMAP | (face->external ? ADDFONT_EXTERNAL_FONT : 0)); debugstr_w(face->StyleName), familyA);
/* 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));
}
break;
} }
break;
} }
} }
/* reset dlen and vlen */ /* reset dlen and vlen */
......
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