diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-30 23:31:29 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-31 14:41:28 -0400 |
commit | aefc5e509e5865779563c65fc9c9d0ae33b615ab (patch) | |
tree | 05723156c81e0e514023018a43252d9a7b6058f5 /pango/fonts.c | |
parent | 2555d464361e96542ec9d9b2383e7ec0fe42dad3 (diff) | |
download | pango-aefc5e509e5865779563c65fc9c9d0ae33b615ab.tar.gz |
fonts: Redo the get_face implementation
Now that we have a private class, we can retire
the misplaced vfunc in the fontmap class.
Diffstat (limited to 'pango/fonts.c')
-rw-r--r-- | pango/fonts.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pango/fonts.c b/pango/fonts.c index f144097d..d2fd4308 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -1737,6 +1737,14 @@ pango_font_default_has_char (PangoFont *font, return result != PANGO_COVERAGE_NONE; } +static PangoFontFace * +pango_font_default_get_face (PangoFont *font) +{ + PangoFontMap *map = pango_font_get_font_map (font); + + return PANGO_FONT_MAP_GET_CLASS (map)->get_face (map,font); +} + static void pango_font_class_init (PangoFontClass *class G_GNUC_UNUSED) { @@ -1751,6 +1759,7 @@ pango_font_class_init (PangoFontClass *class G_GNUC_UNUSED) pclass->is_hinted = pango_font_default_is_hinted; pclass->get_scale_factors = pango_font_default_get_scale_factors; pclass->has_char = pango_font_default_has_char; + pclass->get_face = pango_font_default_get_face; } static void @@ -1979,9 +1988,9 @@ pango_font_get_font_map (PangoFont *font) PangoFontFace * pango_font_get_face (PangoFont *font) { - PangoFontMap *map = pango_font_get_font_map (font); + PangoFontClassPrivate *pclass = PANGO_FONT_GET_CLASS_PRIVATE (font); - return PANGO_FONT_MAP_GET_CLASS (map)->get_face (map,font); + return pclass->get_face (font); } /** |