summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-12 03:35:16 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-07-12 03:35:16 +0000
commit00233bd8b863a87cbf59344b1aed1feba04c66ca (patch)
tree4f388b57fbd10a79785bf3d829419492d51fd77b /pango/fonts.c
parent5590411f895d9e9bc9edd983c9c8df845ec13018 (diff)
parentec4864eef5f5c067093ac46dd66cc948de3467dc (diff)
downloadpango-00233bd8b863a87cbf59344b1aed1feba04c66ca.tar.gz
Merge branch 'font-features-getter' into 'master'
Font features getter See merge request GNOME/pango!82
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 2dd39f2e..081596df 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2327,3 +2327,27 @@ pango_font_covers (PangoFont *font,
pango_coverage_unref (coverage);
return result != PANGO_COVERAGE_NONE;
}
+
+/**
+ * pango_font_get_features:
+ * @font: a #PangoFont
+ * @features: (out caller-allocates) (array length=len): Array to features in
+ * @len: the length of @features
+ * @num_features: (inout): the number of used items in @features
+ *
+ * Obtain the OpenType features for this font.
+ *
+ * These are the features used by default for this font,
+ * unless overridden.
+ *
+ * Since: 1.44
+ */
+void
+pango_font_get_features (PangoFont *font,
+ hb_feature_t *features,
+ guint len,
+ guint *num_features)
+{
+ if (PANGO_FONT_GET_CLASS (font)->get_features)
+ PANGO_FONT_GET_CLASS (font)->get_features (font, features, len, num_features);
+}