summaryrefslogtreecommitdiff
path: root/pango/pangocairo-fcfontmap.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-02-26 10:46:28 +0100
committerAlexander Larsson <alexl@redhat.com>2013-02-26 10:49:55 +0100
commitc5f43d1869373d9e05588c9a13841b5416583e29 (patch)
treeda3b0a3e3066178abd7d7534d34a82f46dcd35c5 /pango/pangocairo-fcfontmap.c
parent6de9b3b340e30856daefc418dc59545afbe62bf0 (diff)
downloadpango-c5f43d1869373d9e05588c9a13841b5416583e29.tar.gz
Add pango_font_map_changed()
This is needed as a base class sometimes needs to invalidate the fontmap. https://bugzilla.gnome.org/show_bug.cgi?id=694626
Diffstat (limited to 'pango/pangocairo-fcfontmap.c')
-rw-r--r--pango/pangocairo-fcfontmap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pango/pangocairo-fcfontmap.c b/pango/pangocairo-fcfontmap.c
index 69fe4929..f7b337d5 100644
--- a/pango/pangocairo-fcfontmap.c
+++ b/pango/pangocairo-fcfontmap.c
@@ -42,6 +42,16 @@ pango_cairo_fc_font_map_get_serial (PangoFontMap *fontmap)
}
static void
+pango_cairo_fc_font_map_changed (PangoFontMap *fontmap)
+{
+ PangoCairoFcFontMap *cffontmap = (PangoCairoFcFontMap *) (fontmap);
+
+ cffontmap->serial++;
+ if (cffontmap->serial == 0)
+ cffontmap->serial++;
+}
+
+static void
pango_cairo_fc_font_map_set_resolution (PangoCairoFontMap *cfontmap,
double dpi)
{
@@ -182,6 +192,7 @@ pango_cairo_fc_font_map_class_init (PangoCairoFcFontMapClass *class)
gobject_class->finalize = pango_cairo_fc_font_map_finalize;
fontmap_class->get_serial = pango_cairo_fc_font_map_get_serial;
+ fontmap_class->changed = pango_cairo_fc_font_map_changed;
fcfontmap_class->fontset_key_substitute = pango_cairo_fc_font_map_fontset_key_substitute;
fcfontmap_class->get_resolution = pango_cairo_fc_font_map_get_resolution_fc;