Paul TBBle Hampson : gdi32: Fetch child fonts by real parent font name.

Alexandre Julliard julliard at winehq.org
Tue May 5 09:12:54 CDT 2009


Module: wine
Branch: master
Commit: 8a4b77883e4ddcd2160a1e05da17ac459b793b73
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a4b77883e4ddcd2160a1e05da17ac459b793b73

Author: Paul TBBle Hampson <Paul.Hampson at Pobox.com>
Date:   Tue Apr 14 22:20:55 2009 +1000

gdi32: Fetch child fonts by real parent font name.

Entries in the list of linked fonts are keyed by the substituted font
name, so need to be looked up by the substituted font name.

---

 dlls/gdi32/freetype.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 2f2c63e..2e088b8 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3194,10 +3194,14 @@ static BOOL create_child_font_list(GdiFont *font)
     BOOL ret = FALSE;
     SYSTEM_LINKS *font_link;
     CHILD_FONT *font_link_entry, *new_child;
+    FontSubst *psub;
+    WCHAR* font_name;
 
+    psub = get_font_subst(&font_subst_list, font->name, -1);
+    font_name = psub ? psub->to.name : font->name;
     LIST_FOR_EACH_ENTRY(font_link, &system_links, SYSTEM_LINKS, entry)
     {
-        if(!strcmpiW(font_link->font_name, font->name))
+        if(!strcmpiW(font_link->font_name, font_name))
         {
             TRACE("found entry in system list\n");
             LIST_FOR_EACH_ENTRY(font_link_entry, &font_link->links, CHILD_FONT, entry)
@@ -3218,7 +3222,7 @@ static BOOL create_child_font_list(GdiFont *font)
      */
     if (use_default_fallback && font->charset != SYMBOL_CHARSET &&
         font->charset != OEM_CHARSET &&
-        strcmpiW(font->name,szDefaultFallbackLink) != 0)
+        strcmpiW(font_name,szDefaultFallbackLink) != 0)
         LIST_FOR_EACH_ENTRY(font_link, &system_links, SYSTEM_LINKS, entry)
         {
             if(!strcmpiW(font_link->font_name,szDefaultFallbackLink))




More information about the wine-cvs mailing list