summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-12-23 14:30:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-12-23 17:04:28 -0500
commit16ba47a34005f390370f64a108c4b4acce8a9875 (patch)
tree7b3a4c066a0a242634252969da3fc71ac4389601 /pango/fonts.c
parent53da3a0a7859ce9bc9e3589d298e6a8169276a95 (diff)
downloadpango-wip/matthiasc/face-lang.tar.gz
Add api to get language coverage for faceswip/matthiasc/face-lang
This is needed to make filtering in the font chooser performant.
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index d9a07c0b..31aa8fb2 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2261,3 +2261,19 @@ pango_font_face_list_sizes (PangoFontFace *face,
*n_sizes = 0;
}
}
+
+void
+pango_font_face_get_languages (PangoFontFace *face,
+ PangoLanguage ***languages,
+ int *n_languages)
+{
+ g_return_if_fail (PANGO_IS_FONT_FACE (face));
+
+ if (PANGO_FONT_FACE_GET_CLASS (face)->get_languages != NULL)
+ PANGO_FONT_FACE_GET_CLASS (face)->get_languages (face, languages, n_languages);
+ else
+ {
+ *languages = NULL;
+ *n_languages = 0;
+ }
+}