summaryrefslogtreecommitdiff
path: root/pango/pangowin32-fontmap.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-13 23:15:00 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-10-31 19:52:36 -0400
commita582dbbb60da8aff7574d576cc636799e89c72d8 (patch)
tree9091d5652eafbf00bd15a8cd62d3027a9880740f /pango/pangowin32-fontmap.c
parent40a805478dfa8988315fd8b7f8515af65c3f90c7 (diff)
downloadpango-a582dbbb60da8aff7574d576cc636799e89c72d8.tar.gz
Add pango_font_get_face
Since we've run out of slots in PangoFontClass, this is implemented with a vfunc in PangoFontMapClass.
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r--pango/pangowin32-fontmap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index ccdd69bd..905fdee2 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -764,7 +764,6 @@ pango_win32_font_map_fontset_add_fonts (PangoFontMap *fontmap,
PangoWin32FontMap *win32fontmap = PANGO_WIN32_FONT_MAP (fontmap);
lookup_aliases (win32fontmap->aliases, family, &aliases, &n_aliases);
-
if (n_aliases)
{
for (j = 0; j < n_aliases; j++)
@@ -784,6 +783,15 @@ pango_win32_font_map_fontset_add_fonts (PangoFontMap *fontmap,
}
}
+static PangoFontFace *
+pango_win32_font_map_get_face (PangoFontMap *fontmap,
+ PangoFont *font)
+{
+ PangoWin32Font *win32font = PANGO_WIN32_FONT (font);
+
+ return PANGO_FONT_FACE (win32font->win32face);
+}
+
static void
_pango_win32_font_map_class_init (PangoWin32FontMapClass *class)
{
@@ -797,6 +805,7 @@ _pango_win32_font_map_class_init (PangoWin32FontMapClass *class)
fontmap_class->load_fontset = pango_win32_font_map_load_fontset;
fontmap_class->list_families = pango_win32_font_map_list_families;
fontmap_class->shape_engine_type = PANGO_RENDER_TYPE_WIN32;
+ fontmap_class->get_face = pango_win32_font_map_get_face;
pango_win32_get_dc ();
}