]> git.wh0rd.org - fontconfig.git/blobdiff - src/fclang.c
Change FcCharSetMerge API
[fontconfig.git] / src / fclang.c
index 361803a60e44a295263626dce35d1396f96abebc..255333683e29a2ddc99a2536983f3dab46066739 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $RCSId: xc/lib/fontconfig/src/fclang.c,v 1.7 2002/08/26 23:34:31 keithp Exp $
+ * fontconfig/src/fclang.c
  *
  * Copyright © 2002 Keith Packard
  *
@@ -23,6 +23,7 @@
  */
 
 #include "fcint.h"
+#include "fcftint.h"
 
 typedef struct {
     const FcChar8      lang[8];
@@ -54,7 +55,7 @@ FcFreeTypeLangSet (const FcCharSet  *charset,
     FcLangSet      *ls;
 
     if (exclusiveLang)
-       exclusiveCharset = FcCharSetForLang (exclusiveLang);
+       exclusiveCharset = FcLangGetCharSet (exclusiveLang);
     ls = FcLangSetCreate ();
     if (!ls)
        return 0;
@@ -196,7 +197,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 +219,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)
 {
@@ -729,4 +746,5 @@ FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l)
 }
 #define __fclang__
 #include "fcaliastail.h"
+#include "fcftaliastail.h"
 #undef __fclang__