[pango] Properly propagate font size in pango_core_text_font_map_load_font



commit a98b025b603fc1605c48f0fcebcdcefe5c99d6dc
Author: Kristian Rietveld <kris gtk org>
Date:   Wed Mar 17 22:56:48 2010 +0100

    Properly propagate font size in pango_core_text_font_map_load_font

 pango/pangocoretext-fontmap.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
index ce55a5b..a507307 100644
--- a/pango/pangocoretext-fontmap.c
+++ b/pango/pangocoretext-fontmap.c
@@ -833,11 +833,14 @@ pango_core_text_font_map_load_font (PangoFontMap               *fontmap,
   const gchar *family;
   gchar *name;
   gint size;
+  gboolean is_absolute;
 
   size = pango_font_description_get_size (description);
   if (size < 0)
     return NULL;
 
+  is_absolute = pango_font_description_get_size_is_absolute (description);
+
   family = pango_font_description_get_family (description);
   family = family ? family : "";
   name = g_utf8_casefold (family, -1);
@@ -856,7 +859,10 @@ pango_core_text_font_map_load_font (PangoFontMap               *fontmap,
       if (!find_best_match (font_family, description, &best_description, &best_face))
 	return NULL;
       
-      pango_font_description_set_size (best_description, size);
+      if (is_absolute)
+        pango_font_description_set_absolute_size (best_description, size);
+      else
+        pango_font_description_set_size (best_description, size);
 
       best_font = pango_core_text_font_map_lookup (ctfontmap,
                                                    context,



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