From 16ba47a34005f390370f64a108c4b4acce8a9875 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 23 Dec 2017 14:30:45 -0500 Subject: Add api to get language coverage for faces This is needed to make filtering in the font chooser performant. --- pango/fonts.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pango/fonts.c') 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; + } +} -- cgit v1.2.1