[pango] Bug 650781 - Font Families are listed lowercase



commit 77f8691aee23357feea015d4c3d008a2335ee5f0
Author: Matej Knopp <matej knopp gmail com>
Date:   Tue May 31 08:20:35 2011 +0200

    Bug 650781 - Font Families are listed lowercase
    
    Fix CoreText backend to not use the casefold string as family name.

 pango/pangocoretext-fontmap.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index 815c35a..542665e 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -939,9 +939,6 @@ pango_core_text_font_map_init (PangoCoreTextFontMap *ctfontmap)
 
       family_name = g_utf8_casefold (buffer, -1);
 
-      CFRelease (str);
-      g_free (buffer);
-
       family = g_hash_table_lookup (ctfontmap->families, family_name);
       if (!family)
         {
@@ -949,12 +946,13 @@ pango_core_text_font_map_init (PangoCoreTextFontMap *ctfontmap)
           g_hash_table_insert (ctfontmap->families, g_strdup (family_name),
                                family);
 
-          family->family_name = family_name;
-          family_name = NULL;
+          family->family_name = g_strdup (buffer);
         }
 
-      if (family_name)
-        g_free (family_name);
+      CFRelease (str);
+      g_free (buffer);
+
+      g_free (family_name);
 
       /* We assume that all faces in the family are monospaced or none. */
       dict = CTFontDescriptorCopyAttribute (desc, kCTFontTraitsAttribute);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]