diff options
Diffstat (limited to 'pango/pangocairo-coretextfontmap.c')
-rw-r--r-- | pango/pangocairo-coretextfontmap.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pango/pangocairo-coretextfontmap.c b/pango/pangocairo-coretextfontmap.c index cd1f3f25..5561358b 100644 --- a/pango/pangocairo-coretextfontmap.c +++ b/pango/pangocairo-coretextfontmap.c @@ -34,12 +34,23 @@ struct _PangoCairoCoreTextFontMapClass PangoCoreTextFontMapClass parent_class; }; +static guint +pango_cairo_core_text_font_map_get_serial (PangoFontMap *fontmap) +{ + PangoCairoCoreTextFontMap *cafontmap = PANGO_CAIRO_CORE_TEXT_FONT_MAP (fontmap); + + return cafontmap->serial; +} + static void pango_cairo_core_text_font_map_set_resolution (PangoCairoFontMap *cfontmap, double dpi) { PangoCairoCoreTextFontMap *cafontmap = PANGO_CAIRO_CORE_TEXT_FONT_MAP (cfontmap); + cafontmap->serial++; + if (cafontmap->serial == 0) + cafontmap->serial++; cafontmap->dpi = dpi; } @@ -144,10 +155,13 @@ static void pango_cairo_core_text_font_map_class_init (PangoCairoCoreTextFontMapClass *class) { PangoCoreTextFontMapClass *ctfontmapclass = (PangoCoreTextFontMapClass *)class; + PangoFontMapClass *fontmap_class = PANGO_FONT_MAP_CLASS (class); GObjectClass *object_class = (GObjectClass *)class; object_class->finalize = pango_cairo_core_text_font_map_finalize; + fontmap_class->get_serial = pango_cairo_core_text_font_map_get_serial; + ctfontmapclass->get_resolution = pango_cairo_core_text_font_map_get_resolution_core_text; ctfontmapclass->create_font = pango_cairo_core_text_font_map_create_font; ctfontmapclass->context_key_get = pango_cairo_core_text_font_map_context_key_get; @@ -160,5 +174,6 @@ pango_cairo_core_text_font_map_class_init (PangoCairoCoreTextFontMapClass *class static void pango_cairo_core_text_font_map_init (PangoCairoCoreTextFontMap *cafontmap) { + cafontmap->serial = 1; cafontmap->dpi = 72.; } |