summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2015-05-01 15:07:48 -0400
committerBehdad Esfahbod <behdad@behdad.org>2015-05-01 15:07:48 -0400
commitd650fc32b145f55da37fe27edbda1624ab7ac437 (patch)
tree8a2517fc0991515977dfc2fa04596ced939fe863 /pango/pangofc-fontmap.c
parent66d0aaa967043822b5d1119ab92ce6137a1ceabb (diff)
downloadpango-d650fc32b145f55da37fe27edbda1624ab7ac437.tar.gz
Bug 748768 - pango_fc_font_map_set_config() should clear caches
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 85dd94cc..6c12e2ef 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1832,7 +1832,7 @@ pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap)
**/
void
pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
- FcConfig *fcconfig)
+ FcConfig *fcconfig)
{
FcConfig *oldconfig;
@@ -1845,6 +1845,9 @@ pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
fcfontmap->priv->config = fcconfig;
+ if (oldconfig != fcconfig)
+ pango_fc_font_map_cache_clear (fcfontmap);
+
if (oldconfig)
FcConfigDestroy (oldconfig);
}