diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2007-11-05 15:29:44 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2007-11-05 15:29:44 -0500 |
commit | cf223cc7bcae94e839d7ac1e980f289cca5199b0 (patch) | |
tree | 2fe3d236d56d4bda43105a8f573608763f4e692f /src/fclang.c | |
parent | 811995b79db16be39046dbbffcc5a7d66f88b731 (diff) |
Add FcGetLangs() and FcLangGetCharSet().
Diffstat (limited to 'src/fclang.c')
-rw-r--r-- | src/fclang.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/fclang.c b/src/fclang.c index 361803a..7aa5f3c 100644 --- a/src/fclang.c +++ b/src/fclang.c @@ -54,7 +54,7 @@ FcFreeTypeLangSet (const FcCharSet *charset, FcLangSet *ls; if (exclusiveLang) - exclusiveCharset = FcCharSetForLang (exclusiveLang); + exclusiveCharset = FcLangGetCharSet (exclusiveLang); ls = FcLangSetCreate (); if (!ls) return 0; @@ -196,7 +196,7 @@ FcLangContains (const FcChar8 *super, const FcChar8 *sub) } const FcCharSet * -FcCharSetForLang (const FcChar8 *lang) +FcLangGetCharSet (const FcChar8 *lang) { int i; int country = -1; @@ -218,6 +218,22 @@ FcCharSetForLang (const FcChar8 *lang) return &fcLangCharSets[country].charset; } +FcStrSet * +FcGetLangs (void) +{ + FcStrSet *langs; + int i; + + langs = FcStrSetCreate(); + if (!langs) + return 0; + + for (i = 0; i < NUM_LANG_CHAR_SET; i++) + FcStrSetAdd (langs, fcLangCharSets[i].lang); + + return langs; +} + FcLangSet * FcLangSetCreate (void) { |