gdi32: Initialize font signature of "System" font link.

Kusanagi Kouichi slash at ac.auone-net.jp
Tue Feb 21 05:14:18 CST 2012


A test at dlls/gdi32/tests/font.c:1019 now passes in ja-jp locale.

Signed-off-by: Kusanagi Kouichi <slash at ac.auone-net.jp>
---
 dlls/gdi32/freetype.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index ea0da85..8a0c096 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2212,6 +2212,7 @@ skip_internal:
     system_font_link = HeapAlloc(GetProcessHeap(), 0, sizeof(*system_font_link));
     system_font_link->font_name = strdupW(System);
     list_init(&system_font_link->links);    
+    memset(&fs, 0, sizeof(fs));
 
     face = find_face_from_filename(tahoma_ttf, Tahoma);
     if(face)
@@ -2219,6 +2220,8 @@ skip_internal:
         child_font = HeapAlloc(GetProcessHeap(), 0, sizeof(*child_font));
         child_font->face = face;
         child_font->font = NULL;
+        fs.fsCsb[0] |= face->fs.fsCsb[0];
+        fs.fsCsb[1] |= face->fs.fsCsb[1];
         TRACE("Found Tahoma in %s index %ld\n", child_font->face->file, child_font->face->face_index);
         list_add_tail(&system_font_link->links, &child_font->entry);
     }
@@ -2233,11 +2236,21 @@ skip_internal:
                 new_child = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_child));
                 new_child->face = font_link_entry->face;
                 new_child->font = NULL;
+                fs.fsCsb[0] |= font_link_entry->face->fs.fsCsb[0];
+                fs.fsCsb[1] |= font_link_entry->face->fs.fsCsb[1];
                 list_add_tail(&system_font_link->links, &new_child->entry);
             }
             break;
         }
     }
+    family = find_family_from_name(system_font_link->font_name);
+    if(family)
+    {
+        LIST_FOR_EACH_ENTRY(face, &family->faces, Face, entry)
+        {
+            face->fs_links = fs;
+        }
+    }
     list_add_tail(&system_links, &system_font_link->entry);
     return ret;
 }
-- 
1.7.9.1




More information about the wine-patches mailing list