gdi32: Use find_family_from_any_name to find a replacement family.
This commit is contained in:
parent
d581f1bf7d
commit
15a6aefb8f
|
@ -1880,9 +1880,6 @@ static void LoadReplaceList(void)
|
||||||
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
|
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
|
||||||
LPWSTR value;
|
LPWSTR value;
|
||||||
LPVOID data;
|
LPVOID data;
|
||||||
Family *family;
|
|
||||||
Face *face;
|
|
||||||
struct list *family_elem_ptr, *face_elem_ptr;
|
|
||||||
CHAR familyA[400];
|
CHAR familyA[400];
|
||||||
|
|
||||||
/* @@ Wine registry key: HKCU\Software\Wine\Fonts\Replacements */
|
/* @@ Wine registry key: HKCU\Software\Wine\Fonts\Replacements */
|
||||||
|
@ -1907,19 +1904,18 @@ static void LoadReplaceList(void)
|
||||||
{
|
{
|
||||||
/* 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) {
|
const Family * const family = find_family_from_any_name(data);
|
||||||
family = LIST_ENTRY(family_elem_ptr, Family, entry);
|
if (family != NULL)
|
||||||
if(!strcmpiW(family->FamilyName, data) || (family->EnglishName && !strcmpiW(family->EnglishName, data))) {
|
{
|
||||||
LIST_FOR_EACH(face_elem_ptr, &family->faces) {
|
const struct list *face_elem_ptr;
|
||||||
face = LIST_ENTRY(face_elem_ptr, Face, entry);
|
LIST_FOR_EACH(face_elem_ptr, &family->faces) {
|
||||||
TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
|
const Face * const face = LIST_ENTRY(face_elem_ptr, Face, entry);
|
||||||
debugstr_w(face->StyleName), familyA);
|
TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
|
||||||
/* Now add a new entry with the new family name */
|
debugstr_w(face->StyleName), familyA);
|
||||||
AddFontToList(face->file, face->font_data_ptr, face->font_data_size,
|
/* Now add a new entry with the new family name */
|
||||||
familyA, family->FamilyName,
|
AddFontToList(face->file, face->font_data_ptr, face->font_data_size,
|
||||||
ADDFONT_FORCE_BITMAP | (face->external ? ADDFONT_EXTERNAL_FONT : 0));
|
familyA, family->FamilyName,
|
||||||
}
|
ADDFONT_FORCE_BITMAP | (face->external ? ADDFONT_EXTERNAL_FONT : 0));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue