diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-02-26 10:46:28 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-02-26 10:49:55 +0100 |
commit | c5f43d1869373d9e05588c9a13841b5416583e29 (patch) | |
tree | da3b0a3e3066178abd7d7534d34a82f46dcd35c5 /pango/pangoxft-fontmap.c | |
parent | 6de9b3b340e30856daefc418dc59545afbe62bf0 (diff) | |
download | pango-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/pangoxft-fontmap.c')
-rw-r--r-- | pango/pangoxft-fontmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c index 803dc186..4976890c 100644 --- a/pango/pangoxft-fontmap.c +++ b/pango/pangoxft-fontmap.c @@ -62,6 +62,7 @@ struct _PangoXftFontMapClass }; static guint pango_xft_font_map_get_serial (PangoFontMap *fontmap); +static void pango_xft_font_map_changed (PangoFontMap *fontmap); static void pango_xft_font_map_default_substitute (PangoFcFontMap *fcfontmap, FcPattern *pattern); static PangoFcFont * pango_xft_font_map_new_font (PangoFcFontMap *fcfontmap, @@ -83,6 +84,7 @@ pango_xft_font_map_class_init (PangoXftFontMapClass *class) gobject_class->finalize = pango_xft_font_map_finalize; fontmap_class->get_serial = pango_xft_font_map_get_serial; + fontmap_class->changed = pango_xft_font_map_changed; fcfontmap_class->default_substitute = pango_xft_font_map_default_substitute; fcfontmap_class->new_font = pango_xft_font_map_new_font; @@ -121,6 +123,16 @@ pango_xft_font_map_get_serial (PangoFontMap *fontmap) return xftfontmap->serial; } +static void +pango_xft_font_map_changed (PangoFontMap *fontmap) +{ + PangoXftFontMap *xftfontmap = PANGO_XFT_FONT_MAP (fontmap); + + xftfontmap->serial++; + if (xftfontmap->serial == 0) + xftfontmap->serial++; +} + static PangoFontMap * pango_xft_find_font_map (Display *display, int screen) |