Huw Davies : gdi32: Don' t load a font replacement if any face of the real family exists.
Alexandre Julliard
julliard at winehq.org
Thu Aug 4 12:22:13 CDT 2011
Module: wine
Branch: master
Commit: 33532613a8572b6dcae51bfe3bbd23f021d0d085
URL: http://source.winehq.org/git/wine.git/?a=commit;h=33532613a8572b6dcae51bfe3bbd23f021d0d085
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Aug 4 16:15:58 2011 +0100
gdi32: Don't load a font replacement if any face of the real family exists.
---
dlls/gdi32/freetype.c | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index cfe8c37..426dc05 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -1613,19 +1613,24 @@ static void LoadReplaceList(void)
/* "NewName"="Oldname" */
WideCharToMultiByte(CP_ACP, 0, value, -1, familyA, sizeof(familyA), NULL, NULL);
- /* Find the old family and hence all of the font files
- in that family */
- LIST_FOR_EACH(family_elem_ptr, &font_list) {
- family = LIST_ENTRY(family_elem_ptr, Family, entry);
- if(!strcmpiW(family->FamilyName, data)) {
- LIST_FOR_EACH(face_elem_ptr, &family->faces) {
- face = LIST_ENTRY(face_elem_ptr, Face, entry);
- TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
- 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));
+ if(!find_family_from_name(value))
+ {
+ /* Find the old family and hence all of the font files
+ in that family */
+ LIST_FOR_EACH(family_elem_ptr, &font_list) {
+ family = LIST_ENTRY(family_elem_ptr, Family, entry);
+ if(!strcmpiW(family->FamilyName, data)) {
+ LIST_FOR_EACH(face_elem_ptr, &family->faces) {
+ face = LIST_ENTRY(face_elem_ptr, Face, entry);
+ TRACE("mapping %s %s to %s\n", debugstr_w(family->FamilyName),
+ 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 */
More information about the wine-cvs
mailing list