--- fontconfig-2.7.1/fontconfig/fcprivate.h.orig	2009-11-19 16:54:22.000000000 +0900
+++ fontconfig-2.7.1/fontconfig/fcprivate.h	2009-12-02 01:49:07.000000000 +0900
@@ -76,6 +76,9 @@
 	case FcTypeLangSet:					    \
 	    __v__.u.l = va_arg (va, const FcLangSet *);		    \
 	    break;						    \
+	case FcTypeCompCharSet:					    \
+	    __v__.u.cc = va_arg (va, const FcCompCharSet*);	    \
+	    break;						    \
 	}							    \
 	if (!FcPatternAdd (__p__, __o__, __v__, FcTrue))	    \
 	    goto _FcPatternVapBuild_bail1;			    \
--- fontconfig-2.7.1/fontconfig/fontconfig.h.orig	2009-11-18 17:52:35.000000000 +0900
+++ fontconfig-2.7.1/fontconfig/fontconfig.h	2009-12-02 00:36:18.000000000 +0900
@@ -112,6 +112,7 @@ typedef int		FcBool;
 #define FC_EMBEDDED_BITMAP  "embeddedbitmap"	/* Bool - true to enable embedded bitmaps */
 #define FC_DECORATIVE	    "decorative"	/* Bool - true if style is a decorative variant */
 #define FC_LCD_FILTER	    "lcdfilter"		/* Int */
+#define FC_COMP_CHARSET	    "compcharset"	/* String */
 
 #define FC_CACHE_SUFFIX		    ".cache-"FC_CACHE_VERSION
 #define FC_DIR_CACHE_FILE	    "fonts.cache-"FC_CACHE_VERSION
@@ -179,6 +180,10 @@ typedef int		FcBool;
 #define FC_LCD_LIGHT	    2
 #define FC_LCD_LEGACY	    3
 
+#define FC_COMP_CHAR_MODE_NONE      0
+#define FC_COMP_CHAR_MODE_WEAK      1
+#define FC_COMP_CHAR_MODE_STRONG    2
+
 typedef enum _FcType {
     FcTypeVoid, 
     FcTypeInteger, 
@@ -188,7 +193,8 @@ typedef enum _FcType {
     FcTypeMatrix,
     FcTypeCharSet,
     FcTypeFTFace,
-    FcTypeLangSet
+    FcTypeLangSet,
+    FcTypeCompCharSet,
 } FcType;
 
 typedef struct _FcMatrix {
@@ -198,6 +204,12 @@ typedef struct _FcMatrix {
 #define FcMatrixInit(m)	((m)->xx = (m)->yy = 1, \
 			 (m)->xy = (m)->yx = 0)
 
+typedef struct _FcCompCharSet {
+    FcChar8     *lang;
+    int          mode:4;
+    FcChar8     *range;
+} FcCompCharSet;
+
 /*
  * A data structure to represent the available glyphs in a font.
  * This is represented as a sparse boolean btree.
@@ -233,6 +245,7 @@ typedef struct _FcValue {
 	FcBool		b;
 	double		d;
 	const FcMatrix	*m;
+	const FcCompCharSet *cc;
 	const FcCharSet	*c;
 	void		*f;
 	const FcLangSet	*l;
@@ -477,6 +490,16 @@ FcCharSetNextPage (const FcCharSet  *a, 
 FcPublic FcChar32
 FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result);
 
+/* fccomcharset */
+void
+FcCompCharSetDestroy (FcCompCharSet *compcharset);
+
+FcCompCharSet *
+FcCompCharSetCopy (const FcCompCharSet *compcharset);
+
+FcBool
+FcCompCharSetEqual (const FcCompCharSet *a, const FcCompCharSet *b);
+
 /* fcdbg.c */
 FcPublic void
 FcValuePrint (const FcValue v);
@@ -830,6 +853,9 @@ FcPatternGetBool (const FcPattern *p, co
 FcPublic FcResult
 FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
 
+FcPublic FcResult
+FcPatternGetCompCharSet (const FcPattern *p, const char *object, int n, FcCompCharSet **cc);
+
 FcPublic FcPattern *
 FcPatternVaBuild (FcPattern *p, va_list va);
     
--- fontconfig-2.7.1/src/fccfg.c.orig	2009-11-05 17:38:23.000000000 +0900
+++ fontconfig-2.7.1/src/fccfg.c	2009-12-01 22:51:10.000000000 +0900
@@ -847,6 +847,21 @@ FcConfigCompareValue (const FcValue	*lef
 		break;
 	    }
 	    break;
+	case FcTypeCompCharSet:
+	    switch (op) {
+	    case FcOpEqual:
+	    case FcOpContains:
+	    case FcOpListing:
+		ret = FcCompCharSetEqual (left.u.cc, right.u.cc);
+		break;
+	    case FcOpNotEqual:
+	    case FcOpNotContains:
+		ret = !FcCompCharSetEqual (left.u.cc, right.u.cc);
+		break;
+	    default:
+		break;
+	    }
+	    break;
 	}
     }
     else
@@ -897,6 +912,11 @@ FcConfigEvaluate (FcPattern *p, FcExpr *
 	v.u.c = e->u.cval;
 	v = FcValueSave (v);
 	break;
+    case FcOpCompCharSet:
+	v.type = FcTypeCompCharSet;
+	v.u.cc = e->u.ccval;
+	v = FcValueSave (v);
+	break;
     case FcOpBool:
 	v.type = FcTypeBool;
 	v.u.b = e->u.bval;
--- fontconfig-2.7.1/src/fccharset.c.orig	2009-12-01 21:30:12.000000000 +0900
+++ fontconfig-2.7.1/src/fccharset.c	2009-12-01 22:45:49.000000000 +0900
@@ -1418,6 +1418,73 @@ FcCharSetSerialize(FcSerialize *serializ
     
     return cs_serialized;
 }
+
+void
+FcCompCharSetDestroy (FcCompCharSet *compcharset)
+{
+    FcMemFree (FC_MEM_COMPCHARSET, sizeof (FcCompCharSet));
+    FcStrFree (compcharset->lang);
+    FcStrFree (compcharset->range);
+    free (compcharset);
+}
+
+FcCompCharSet *
+FcCompCharSetCopy (const FcCompCharSet *compcharset)
+{
+    FcCompCharSet *r;
+    if (!compcharset)
+        return 0;
+    r = (FcCompCharSet *) malloc (sizeof (*r) );
+    if (!r)
+        return 0;
+    FcMemAlloc (FC_MEM_COMPCHARSET, sizeof (FcCompCharSet));
+    r->lang = FcStrCopy (compcharset->lang);
+    r->mode = compcharset->mode;
+    r->range = FcStrCopy (compcharset->range);
+    return r;
+}
+
+FcBool
+FcCompCharSetEqual (const FcCompCharSet *a, const FcCompCharSet *b)
+{
+    FcBool equal_lang = FcFalse;
+    FcBool equal_mode = FcFalse;
+    FcBool equal_range = FcFalse;
+
+    if (a == b)
+	return FcTrue;
+    if (a == NULL || b == NULL)
+	return FcFalse;
+
+    if (a->lang == NULL || b->lang == NULL)
+    {
+	if (a->lang == b->lang)
+	    equal_lang = FcTrue;
+	else
+	    equal_lang = FcFalse;
+    }
+    else
+	    equal_lang = (strcmp ((char *) a->lang, (char *) b->lang) == 0) ?
+	                 FcTrue : FcFalse;
+
+    if (a->mode == b->mode)
+	    equal_mode = FcTrue;
+    else
+	    equal_mode = FcFalse;
+
+    if (a->range == NULL || b->range == NULL)
+    {
+	if (a->range == b->range)
+	    equal_range = FcTrue;
+	else
+	    equal_range = FcFalse;
+    }
+    else
+	    equal_range = (strcmp ((char *) a->range, (char *) b->range) == 0) ?
+	                 FcTrue : FcFalse;
+
+    return equal_lang & equal_mode & equal_range;
+}
 #define __fccharset__
 #include "fcaliastail.h"
 #undef __fccharset__
--- fontconfig-2.7.1/src/fcdbg.c.orig	2009-11-19 16:29:39.000000000 +0900
+++ fontconfig-2.7.1/src/fcdbg.c	2009-12-02 01:31:32.000000000 +0900
@@ -59,6 +59,10 @@ FcValuePrint (const FcValue v)
     case FcTypeFTFace:
 	printf (" face");
 	break;
+    case FcTypeCompCharSet:
+	printf (" \n");
+	FcCompCharSetPrint (v.u.cc);
+	break;
     }
 }
 
@@ -131,6 +135,27 @@ FcCharSetPrint (const FcCharSet *c)
 }
 
 void
+FcCompCharSetPrint (const FcCompCharSet *cc)
+{
+    const char *mode_str = NULL;
+
+    switch (cc->mode)
+    {
+    case FC_COMP_CHAR_MODE_NONE:
+	mode_str = "No Mode"; break;
+    case FC_COMP_CHAR_MODE_WEAK:
+	mode_str = "Weak"; break;
+    case FC_COMP_CHAR_MODE_STRONG:
+	mode_str = "Strong"; break;
+    default:
+	mode_str = "No Mode";
+    }
+    printf ("\t  Lang: %s\n", cc->lang ? (char * ) cc->lang : "(null)");
+    printf ("\t  Mode: %s\n", mode_str);
+    printf ("\t  Range: %s", cc->range ? (char * ) cc->range : "(null)");
+}
+
+void
 FcPatternPrint (const FcPattern *p)
 {
     int		    i;
@@ -193,6 +218,7 @@ FcOpPrint (FcOp op)
     case FcOpRound: printf ("Round"); break;
     case FcOpTrunc: printf ("Trunc"); break;
     case FcOpListing: printf ("Listing"); break;
+    case FcOpCompCharSet: printf ("CompCharSet"); break;
     case FcOpInvalid: printf ("Invalid"); break;
     }
 }
@@ -222,6 +248,10 @@ FcExprPrint (const FcExpr *expr)
 	printf (" colon ");
 	FcExprPrint (expr->u.tree.right->u.tree.right);
 	break;
+    case FcOpCompCharSet: printf ("%s %d %s",
+			          expr->u.ccval->lang ? (char * ) expr->u.ccval->lang : "(null)",
+			          expr->u.ccval->mode,
+			          expr->u.ccval->range ? (char * ) expr->u.ccval->range : "(null)"); break;
     case FcOpAssign:
     case FcOpAssignReplace:
     case FcOpPrependFirst:
--- fontconfig-2.7.1/src/fcint.h.orig	2009-11-19 14:13:25.000000000 +0900
+++ fontconfig-2.7.1/src/fcint.h	2009-12-02 01:26:45.000000000 +0900
@@ -104,8 +104,9 @@
 #define FC_MEM_ATTR	    27
 #define FC_MEM_PSTACK	    28
 #define FC_MEM_STATICSTR    29
+#define FC_MEM_COMPCHARSET  30
 
-#define FC_MEM_NUM	    30
+#define FC_MEM_NUM	    31
 
 #define FC_BANK_DYNAMIC 0
 #define FC_BANK_FIRST 1
@@ -171,6 +172,7 @@ typedef enum _FcValueBinding {
 #define FcValueString(v)	FcPointerMember(v,u.s,FcChar8)
 #define FcValueCharSet(v)	FcPointerMember(v,u.c,const FcCharSet)
 #define FcValueLangSet(v)	FcPointerMember(v,u.l,const FcLangSet)
+#define FcValueCompCharSet(v)	FcPointerMember(v,u.cc,const FcCompCharSet)
 
 typedef struct _FcValueList *FcValueListPtr;
 
@@ -217,6 +219,7 @@ struct _FcPattern {
 						
 typedef enum _FcOp {
     FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet, 
+    FcOpCompCharSet,
     FcOpNil,
     FcOpField, FcOpConst,
     FcOpAssign, FcOpAssignReplace, 
@@ -241,6 +244,7 @@ typedef struct _FcExpr {
 	FcCharSet   *cval;
 	FcObject    object;
 	FcChar8	    *constant;
+	FcCompCharSet *ccval;
 	struct {
 	    struct _FcExpr *left, *right;
 	} tree;
@@ -414,6 +418,7 @@ typedef struct _FcCaseFold {
 #define fc_value_string(v)	FcValueString(v)
 #define fc_value_charset(v)	FcValueCharSet(v)
 #define fc_value_langset(v)	FcValueLangSet(v)
+#define fc_value_compcharset(v)	FcValueCompCharSet(v)
 #define fc_storage_type(v)	((v)->type)
 
 #define fc_alignof(type) offsetof (struct { char c; type member; }, member)
@@ -707,6 +712,9 @@ FcSubstPrint (const FcSubst *subst);
 FcPrivate void
 FcCharSetPrint (const FcCharSet *c);
     
+FcPrivate void
+FcCompCharSetPrint (const FcCompCharSet *cc);
+    
 extern FcPrivate int FcDebugVal;
 
 #define FcDebug() (FcDebugVal)
--- fontconfig-2.7.1/src/fclist.c.orig	2009-11-19 17:04:01.000000000 +0900
+++ fontconfig-2.7.1/src/fclist.c	2009-12-02 01:40:05.000000000 +0900
@@ -257,6 +257,9 @@ FcListValueHash (FcValue    *value)
 	return (long) v.u.f;
     case FcTypeLangSet:
 	return FcLangSetHash (v.u.l);
+    case FcTypeCompCharSet:
+	return (v.u.cc && v.u.cc->range) ?
+	    FcStrHashIgnoreCase (v.u.cc->range) : 0;
     }
     return 0;
 }
--- fontconfig-2.7.1/src/fcname.c.orig	2009-11-11 12:36:56.000000000 +0900
+++ fontconfig-2.7.1/src/fcname.c	2009-11-25 22:55:52.000000000 +0900
@@ -75,7 +75,8 @@ static const FcObjectType _FcBaseObjectT
     { FC_EMBOLDEN,	FcTypeBool },
     { FC_EMBEDDED_BITMAP,   FcTypeBool },
     { FC_DECORATIVE,	FcTypeBool },
-    { FC_LCD_FILTER,	FcTypeInteger }, /* 41 */
+    { FC_LCD_FILTER,	FcTypeInteger },
+    { FC_COMP_CHARSET,	FcTypeString }, /* 42 */
 };
 
 #define NUM_OBJECT_TYPES    (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0])
@@ -310,6 +311,8 @@ FcObjectValidType (FcObject object, FcTy
 	default:
 	    if (type == t->type)
 		return FcTrue;
+	    if (type == FcTypeCompCharSet && t->type == FcTypeString)
+		return FcTrue;
 	    break;
 	}
 	return FcFalse;
@@ -814,6 +817,12 @@ FcNameUnparseValue (FcStrBuf	*buf,
 	return FcNameUnparseLangSet (buf, v.u.l);
     case FcTypeFTFace:
 	return FcTrue;
+    case FcTypeCompCharSet:
+	sprintf ((char *) temp, "%s %d %s", 
+		 v.u.cc->lang ? (char* ) v.u.cc->lang : "(null)",
+		 v.u.cc->mode,
+		 v.u.cc->range ? (char* ) v.u.cc->range : "(null)");
+	return FcNameUnparseString (buf, temp, 0);
     }
     return FcFalse;
 }
--- fontconfig-2.7.1/src/fcpat.c.orig	2009-11-19 16:40:18.000000000 +0900
+++ fontconfig-2.7.1/src/fcpat.c	2009-12-02 01:16:24.000000000 +0900
@@ -62,6 +62,9 @@ FcValueDestroy (FcValue v)
     case FcTypeLangSet:
 	FcLangSetDestroy ((FcLangSet *) v.u.l);
 	break;
+    case FcTypeCompCharSet:
+	FcCompCharSetDestroy ((FcCompCharSet *) v.u.cc);
+	break;
     default:
 	break;
     }
@@ -86,6 +89,10 @@ FcValueCanonicalize (const FcValue *v)
 	new.u.l = fc_value_langset(v);
 	new.type = FcTypeLangSet;
 	break;
+    case FcTypeCompCharSet:
+	new.u.cc = fc_value_compcharset (v);
+	new.type = FcTypeCompCharSet;
+	break;
     default:
 	new = *v;
 	break;
@@ -117,6 +124,11 @@ FcValueSave (FcValue v)
 	if (!v.u.l)
 	    v.type = FcTypeVoid;
 	break;
+    case FcTypeCompCharSet:
+	v.u.cc = FcCompCharSetCopy (v.u.cc);
+	if (!v.u.cc)
+	    v.type = FcTypeVoid;
+	break;
     default:
 	break;
     }
@@ -145,6 +157,10 @@ FcValueListDestroy (FcValueListPtr l)
 	    FcLangSetDestroy 
 		((FcLangSet *) (l->value.u.l));
 	    break;
+	case FcTypeCompCharSet:
+	    FcCompCharSetDestroy 
+		((FcCompCharSet *) (l->value.u.cc));
+	    break;
 	default:
 	    break;
 	}
@@ -191,6 +207,8 @@ FcValueEqual (FcValue va, FcValue vb)
 	return va.u.f == vb.u.f;
     case FcTypeLangSet:
 	return FcLangSetEqual (va.u.l, vb.u.l);
+    case FcTypeCompCharSet:
+	return FcCompCharSetEqual (va.u.cc, vb.u.cc);
     }
     return FcFalse;
 }
@@ -243,6 +261,10 @@ FcValueHash (const FcValue *v)
 	       FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name);
     case FcTypeLangSet:
 	return FcLangSetHash (fc_value_langset(v));
+    case FcTypeCompCharSet:
+	if (fc_value_compcharset(v) == 0)
+	    return (FcChar32) 0;
+	return FcStringHash ((const FcChar8 *) fc_value_compcharset(v)->range);
     }
     return FcFalse;
 }
@@ -901,6 +923,21 @@ FcPatternGetLangSet(const FcPattern *p, 
     return FcResultMatch;
 }
 
+FcResult
+FcPatternGetCompCharSet (const FcPattern *p, const char *object, int id, FcCompCharSet **cc)
+{
+    FcValue	v;
+    FcResult	r;
+
+    r = FcPatternGet (p, object, id, &v);
+    if (r != FcResultMatch)
+	return r;
+    if (v.type != FcTypeCompCharSet)
+        return FcResultTypeMismatch;
+    *cc = (FcCompCharSet *)v.u.cc;
+    return FcResultMatch;
+}
+
 FcPattern *
 FcPatternDuplicate (const FcPattern *orig)
 {
--- fontconfig-2.7.1/src/fcxml.c.orig	2009-11-11 12:59:18.000000000 +0900
+++ fontconfig-2.7.1/src/fcxml.c	2009-12-02 01:46:46.000000000 +0900
@@ -120,6 +120,18 @@ FcExprCreateMatrix (FcConfig *config, co
 }
 
 static FcExpr *
+FcExprCreateCompCharSet (FcConfig *config, const FcCompCharSet *m)
+{
+    FcExpr *e = FcConfigAllocExpr (config);
+    if (e)
+    {
+	e->op = FcOpCompCharSet;
+	e->u.ccval = FcCompCharSetCopy (m);
+    }
+    return e;
+}
+
+static FcExpr *
 FcExprCreateBool (FcConfig *config, FcBool b)
 {
     FcExpr *e = FcConfigAllocExpr (config);
@@ -198,6 +210,9 @@ FcExprDestroy (FcExpr *e)
     case FcOpCharSet:
 	FcCharSetDestroy (e->u.cval);
 	break;
+    case FcOpCompCharSet:
+	FcCompCharSetDestroy (e->u.ccval);
+	break;
     case FcOpBool:
 	break;
     case FcOpField:
@@ -289,6 +304,9 @@ typedef enum _FcElement {
     FcElementMatrix,
     FcElementBool,
     FcElementCharset,
+    FcElementCompositeCharset,
+    FcElementCompositeLang,
+    FcElementCompositeMode,
     FcElementName,
     FcElementConst,
     FcElementOr,
@@ -350,6 +368,9 @@ static const struct {
     { "matrix",		FcElementMatrix },
     { "bool",		FcElementBool },
     { "charset",	FcElementCharset },
+    { "compcharset",	FcElementCompositeCharset },
+    { "complang",	FcElementCompositeLang },
+    { "compmode",	FcElementCompositeMode },
     { "name",		FcElementName },
     { "const",		FcElementConst },
     { "or",		FcElementOr },
@@ -412,6 +433,8 @@ typedef enum _FcVStackTag {
     FcVStackDouble,
     FcVStackMatrix,
     FcVStackBool,
+    FcVStackCompCharset,
+    FcVStackCompLang,
     
     FcVStackTest,
     FcVStackExpr,
@@ -429,6 +452,7 @@ typedef struct _FcVStack {
 	double		_double;
 	FcMatrix	*matrix;
 	FcBool		bool_;
+	FcCompCharSet   *compcharset;
 
 	FcTest		*test;
 	FcQual		qual;
@@ -510,6 +534,8 @@ FcTypeName (FcType type)
 	return "FT_Face";
     case FcTypeLangSet:
 	return "langset";
+    case FcTypeCompCharSet:
+	return "compcharset";
     default:
 	return "unknown";
     }
@@ -525,7 +551,8 @@ FcTypecheckValue (FcConfigParse *parse, 
     if (value != type)
     {
 	if ((value == FcTypeLangSet && type == FcTypeString) ||
-	    (value == FcTypeString && type == FcTypeLangSet))
+	    (value == FcTypeString && type == FcTypeLangSet) ||
+	    (value == FcTypeCompCharSet && type == FcTypeString))
 	    return;
 	if (type == (FcType) -1)
 	    return;
@@ -561,6 +588,9 @@ FcTypecheckExpr (FcConfigParse *parse, F
     case FcOpCharSet:
 	FcTypecheckValue (parse, FcTypeCharSet, type);
 	break;
+    case FcOpCompCharSet:
+	FcTypecheckValue (parse, FcTypeCompCharSet, type);
+	break;
     case FcOpNil:
 	break;
     case FcOpField:
@@ -763,6 +793,21 @@ FcVStackPushBool (FcConfigParse *parse, 
 }
 
 static FcBool
+FcVStackPushCompCharSet (FcConfigParse *parse, FcCompCharSet *compcharset)
+{
+    FcVStack    *vstack;
+    compcharset = FcCompCharSetCopy (compcharset);
+    if (!compcharset)
+	return FcFalse;
+    vstack = FcVStackCreateAndPush (parse);
+    if (!vstack)
+	return FcFalse;
+    vstack->u.compcharset = compcharset;
+    vstack->tag = FcVStackCompCharset;
+    return FcTrue;
+}
+
+static FcBool
 FcVStackPushTest (FcConfigParse *parse, FcTest *test)
 {
     FcVStack    *vstack = FcVStackCreateAndPush (parse);
@@ -842,6 +887,7 @@ FcVStackPopAndDestroy (FcConfigParse *pa
     case FcVStackField:
     case FcVStackConstant:
     case FcVStackGlob:
+    case FcVStackCompLang:
 	FcStrFree (vstack->u.string);
 	break;
     case FcVStackPattern:
@@ -855,6 +901,9 @@ FcVStackPopAndDestroy (FcConfigParse *pa
 	break;
     case FcVStackBool:
 	break;
+    case FcVStackCompCharset:
+	FcCompCharSetDestroy (vstack->u.compcharset);
+	break;
     case FcVStackTest:
 	FcTestDestroy (vstack->u.test);
 	break;
@@ -1504,6 +1553,9 @@ FcPopExpr (FcConfigParse *parse)
     case FcVStackField:
 	expr = FcExprCreateField (parse->config, (char *) vstack->u.string);
 	break;
+    case FcVStackCompLang:
+	expr = FcExprCreateString (parse->config, vstack->u.string);
+	break;
     case FcVStackConstant:
 	expr = FcExprCreateConst (parse->config, vstack->u.string);
 	break;
@@ -1528,6 +1580,9 @@ FcPopExpr (FcConfigParse *parse)
     case FcVStackBool:
 	expr = FcExprCreateBool (parse->config, vstack->u.bool_);
 	break;
+    case FcVStackCompCharset:
+	expr = FcExprCreateCompCharSet (parse->config, vstack->u.compcharset);
+	break;
     case FcVStackTest:
 	break;
     case FcVStackExpr:
@@ -1861,6 +1916,8 @@ FcParseMatch (FcConfigParse *parse)
 				 FcObjectName(edit->object));
 	    }
 	    break;
+	case FcVStackPattern:
+	    break;
 	default:
 	    FcConfigMessage (parse, FcSevereWarning, "invalid match element");
 	    break;
@@ -1872,6 +1929,65 @@ FcParseMatch (FcConfigParse *parse)
 }
 
 static void
+FcParseCompositeCharset (FcConfigParse *parse)
+{
+    FcVStack	*vstack;
+    FcCompCharSet compcharset;
+
+    memset (&compcharset, 0, sizeof (FcCompCharSet));
+
+    while ((vstack = FcVStackPeek (parse)))
+    {
+	switch (vstack->tag) {
+	case FcVStackString:
+	    compcharset.range = (FcChar8 * ) FcStrStaticName (vstack->u.string);
+	    break;
+	case FcVStackCompLang:
+	    compcharset.lang = (FcChar8 * ) FcStrStaticName (vstack->u.string);
+	    break;
+	case FcVStackInteger:
+	    compcharset.mode = vstack->u.integer;
+	    break;
+	default:
+	    FcConfigMessage (parse, FcSevereWarning, "wrong compcharset values");
+	    break;
+	}
+	FcVStackPopAndDestroy (parse);
+    }
+
+    if (compcharset.range == NULL)
+	FcConfigMessage (parse, FcSevereError, "wrong charset ranges");
+    else
+        FcVStackPushCompCharSet (parse, &compcharset);
+}
+
+static void
+FcParseCompositeMode (FcConfigParse *parse)
+{
+    FcChar8 *s;
+    
+    if (!parse->pstack)
+	return;
+    s = FcStrBufDoneStatic (&parse->pstack->str);
+    if (!s)
+    {
+	FcConfigMessage (parse, FcSevereError, "out of memory");
+	return;
+    }
+    if (!strncmp ((char *) s, "weak", strlen ("weak")))
+        FcVStackPushInteger (parse, FC_COMP_CHAR_MODE_WEAK);
+    else if (!strncmp ((char *) s, "strong", strlen ("strong")))
+        FcVStackPushInteger (parse, FC_COMP_CHAR_MODE_STRONG);
+    else
+    {
+        FcConfigMessage (parse, FcSevereWarning, "unknown mode %s", (char*)s);
+        FcVStackPushInteger (parse, FC_COMP_CHAR_MODE_NONE);
+    }
+
+    FcStrBufDestroy (&parse->pstack->str);
+}
+
+static void
 FcParseAcceptRejectFont (FcConfigParse *parse, FcElement element)
 {
     FcVStack	*vstack;
@@ -1944,6 +2060,11 @@ FcPopValue (FcConfigParse *parse)
 	value.u.b = vstack->u.bool_;
 	value.type = FcTypeBool;
 	break;
+    case FcVStackCompCharset:
+	value.u.cc = FcCompCharSetCopy (vstack->u.compcharset);
+	if (value.u.cc)
+	    value.type = FcTypeCompCharSet;
+	break;
     default:
 	FcConfigMessage (parse, FcSevereWarning, "unknown pattern element %d", 
 			 vstack->tag);
@@ -2226,6 +2347,15 @@ FcEndElement(void *userData, const XML_C
     case FcElementCharset:
 /*	FcParseCharset (parse); */
 	break;
+    case FcElementCompositeCharset:
+	FcParseCompositeCharset (parse);
+	break;
+    case FcElementCompositeLang:
+	FcParseString (parse, FcVStackCompLang);
+	break;
+    case FcElementCompositeMode:
+	FcParseCompositeMode (parse);
+	break;
     case FcElementSelectfont:
 	break;
     case FcElementAcceptfont:
