From 5039bdecec48240ef4e56d095451adc2769d8931 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 5 Nov 2007 20:42:37 +0000 Subject: Update to new propsed language enumeration API for fontconfig. 2007-11-05 Behdad Esfahbod * tools/gen-script-for-lang-new.c (scripts_for_lang), (main): Update to new propsed language enumeration API for fontconfig. svn path=/trunk/; revision=2492 --- tools/gen-script-for-lang-new.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/gen-script-for-lang-new.c b/tools/gen-script-for-lang-new.c index 2ef49859..ba38ae69 100644 --- a/tools/gen-script-for-lang-new.c +++ b/tools/gen-script-for-lang-new.c @@ -111,7 +111,7 @@ scripts_for_lang (LangInfo *info) FcChar32 map[FC_CHARSET_MAP_SIZE]; int i; - charset = FcCharSetForLang ((const FcChar8 *) info->lang); + charset = FcLangGetCharSet ((const FcChar8 *) info->lang); if (!charset) return; @@ -208,6 +208,7 @@ int main (void) int max_lang_len = 0; int max_script_len = 0; + FcStrSet *langs_set; FcStrList *langs; FcChar8* lang; @@ -222,7 +223,9 @@ int main (void) script_array = g_array_new (FALSE, FALSE, sizeof (LangInfo)); - langs = FcGetLangs (); + langs_set = FcGetLangs (); + langs = FcStrListCreate (langs_set); + FcStrSetDestroy (langs_set); while ((lang = FcStrListNext (langs))) do_lang (script_array, lang); -- cgit v1.2.1