summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-12-08 03:41:22 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-12-08 03:41:22 +0000
commitb91e7a051c745021e53ec30ab114a54dafc52fb1 (patch)
tree5e2342a53cd9bf47109e13537d6b345d91e374fe /pango/pangofc-fontmap.c
parent9a7e5dd5e9a7f5f5397273082a7ca356699106d6 (diff)
downloadpango-b91e7a051c745021e53ec30ab114a54dafc52fb1.tar.gz
Bug 499624 – Spaces around commas in PangoFontDescription family name
2008-12-07 Behdad Esfahbod <behdad@gnome.org> Bug 499624 – Spaces around commas in PangoFontDescription family name should be trimmed * pango/pangofc-fontmap.c (pango_fc_make_pattern): Trim family strings before adding to pattern. svn path=/trunk/; revision=2752
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 5c5dbe58..edda2a3f 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -845,8 +845,11 @@ pango_fc_make_pattern (const PangoFontDescription *description,
families = g_strsplit (pango_font_description_get_family (description), ",", -1);
- for (i = 0; families[i]; i++)
- FcPatternAddString (pattern, FC_FAMILY, families[i]);
+ for (i = 0; families[i]; i++) {
+ char *family = pango_trim_string (families[i]);
+ FcPatternAddString (pattern, FC_FAMILY, family);
+ g_free (family);
+ }
g_strfreev (families);