summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2009-01-30 05:04:47 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2009-01-30 05:04:47 +0000
commit65c5836108e3e35f10178f6b85aade14b9e8d887 (patch)
tree1f273c389c28cba1d5b4d1c1b130cc26b1b8fbd4
parent52d8ad64f1dabf981b9d25749099b80ce819bceb (diff)
downloadpango-65c5836108e3e35f10178f6b85aade14b9e8d887.tar.gz
Bug 569763 – pango doesn't like font descriptions without family!
2009-01-30 Behdad Esfahbod <behdad@gnome.org> Bug 569763 – pango doesn't like font descriptions without family! * pango/pangofc-fontmap.c (pango_fc_make_pattern): Don't crash is desc doesn't have family set. svn path=/trunk/; revision=2821
-rw-r--r--ChangeLog7
-rw-r--r--pango/pangofc-fontmap.c12
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6aaec213..318b578b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-30 Behdad Esfahbod <behdad@gnome.org>
+
+ Bug 569763 – pango doesn't like font descriptions without family!
+
+ * pango/pangofc-fontmap.c (pango_fc_make_pattern): Don't crash is desc
+ doesn't have family set.
+
2009-01-29 Behdad Esfahbod <behdad@gnome.org>
* pango-view/viewer-render.c (make_layout), (get_options_string):
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index a302d4dd..11cb6762 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1353,13 +1353,15 @@ pango_fc_make_pattern (const PangoFontDescription *description,
FC_PIXEL_SIZE, FcTypeDouble, pixel_size / 1024.,
NULL);
- g_message ("'%s'", pango_font_description_get_family (description));
- families = g_strsplit (pango_font_description_get_family (description), ",", -1);
+ if (pango_font_description_get_family (description))
+ {
+ families = g_strsplit (pango_font_description_get_family (description), ",", -1);
- for (i = 0; families[i]; i++)
- FcPatternAddString (pattern, FC_FAMILY, (FcChar8*) families[i]);
+ for (i = 0; families[i]; i++)
+ FcPatternAddString (pattern, FC_FAMILY, (FcChar8*) families[i]);
- g_strfreev (families);
+ g_strfreev (families);
+ }
if (language)
FcPatternAddString (pattern, FC_LANG, (FcChar8 *) pango_language_to_string (language));