summaryrefslogtreecommitdiff
path: root/pango/fonts.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/fonts.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/fonts.c')
-rw-r--r--pango/fonts.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 5c685f77..9e6325b7 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1881,6 +1881,24 @@ pango_font_get_font_map (PangoFont *font)
}
/**
+ * pango_font_get_face:
+ * @font: a #PangoFont
+ *
+ * Gets the #PangoFontFace to which @font belongs.
+ *
+ * Returns: (transfer none): the #PangoFontFace
+ *
+ * Since: 1.46
+ */
+PangoFontFace *
+pango_font_get_face (PangoFont *font)
+{
+ PangoFontMap *map = pango_font_get_font_map (font);
+
+ return PANGO_FONT_MAP_GET_CLASS (map)->get_face (map,font);
+}
+
+/**
* pango_font_get_hb_font: (skip)
* @font: a #PangoFont
*