summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-12 02:25:55 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-07-12 02:25:55 +0000
commit5590411f895d9e9bc9edd983c9c8df845ec13018 (patch)
treea9301dd17689f33e0d27030928ea7d5fda867422 /pango/fonts.c
parentcdeb8308ff13f7c6c4bc583b803bb13e5224277c (diff)
parent70e59beb9862f48e08c364c48f4d93356402a162 (diff)
downloadpango-5590411f895d9e9bc9edd983c9c8df845ec13018.tar.gz
Merge branch 'coverage-redo' into 'master'
Redo coverage See merge request GNOME/pango!81
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index f273cd26..2dd39f2e 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2306,3 +2306,24 @@ pango_font_face_list_sizes (PangoFontFace *face,
*n_sizes = 0;
}
}
+
+/**
+ * pango_font_covers:
+ * @font: a #PangoFont
+ * @wc: a Unicode character
+ *
+ * Returns whether the font provides a glyph for this character.
+ *
+ * Returns %TRUE if @font can render @wc
+ *
+ * Since: 1.44
+ */
+gboolean
+pango_font_covers (PangoFont *font,
+ gunichar wc)
+{
+ PangoCoverage *coverage = pango_font_get_coverage (font, pango_language_get_default ());
+ PangoCoverageLevel result = pango_coverage_get (coverage, wc);
+ pango_coverage_unref (coverage);
+ return result != PANGO_COVERAGE_NONE;
+}