summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}