summaryrefslogtreecommitdiff
path: root/pango/pangocairo-win32fontmap.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-win32fontmap.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-win32fontmap.c')
-rw-r--r--pango/pangocairo-win32fontmap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pango/pangocairo-win32fontmap.c b/pango/pangocairo-win32fontmap.c
index cd4e12ee..d64e9a99 100644
--- a/pango/pangocairo-win32fontmap.c
+++ b/pango/pangocairo-win32fontmap.c
@@ -42,6 +42,16 @@ pango_cairo_win32_font_map_get_serial (PangoFontMap *fontmap)
}
static void
+pango_cairo_win32_font_map_changed (PangoFontMap *fontmap)
+{
+ PangoCairoWin32FontMap *cwfontmap = PANGO_CAIRO_WIN32_FONT_MAP (fontmap);
+
+ cwfontmap->serial++;
+ if (cwfontmap->serial == 0)
+ cwfontmap->serial++;
+}
+
+static void
pango_cairo_win32_font_map_set_resolution (PangoCairoFontMap *cfontmap,
double dpi)
{
@@ -105,6 +115,7 @@ pango_cairo_win32_font_map_class_init (PangoCairoWin32FontMapClass *class)
gobject_class->finalize = pango_cairo_win32_font_map_finalize;
fontmap_class->get_serial = pango_cairo_win32_font_map_get_serial;
+ fontmap_class->changed = pango_cairo_win32_font_map_changed;
win32fontmap_class->find_font = pango_cairo_win32_font_map_find_font;
}