[pango] Check kCTFontCondensedTrait when creating from CTFontDescriptionRef.



commit 91024c84f73ddefb4bde174e0a1689b2d136a9b6
Author: Cody Russell <cody jhu edu>
Date:   Fri Oct 31 22:43:01 2014 -0500

    Check kCTFontCondensedTrait when creating from CTFontDescriptionRef.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734372

 pango/pangocoretext-fontmap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index 9656fb8..168b47e 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -413,6 +413,9 @@ _pango_core_text_font_description_from_ct_font_descriptor (CTFontDescriptorRef d
   else
     pango_font_description_set_style (font_desc, PANGO_STYLE_NORMAL);
 
+  if ((font_traits & kCTFontCondensedTrait) == kCTFontCondensedTrait)
+    pango_font_description_set_stretch (font_desc, PANGO_STRETCH_CONDENSED);
+
   if (ct_font_descriptor_is_small_caps (desc))
     pango_font_description_set_variant (font_desc, PANGO_VARIANT_SMALL_CAPS);
   else


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