Do not copy FC_*LANG_OBJECT even if it's not available on the pattern
authorAkira TAGOH <akira@tagoh.org>
Thu, 7 Mar 2013 04:19:50 +0000 (13:19 +0900)
committerAkira TAGOH <akira@tagoh.org>
Thu, 7 Mar 2013 04:20:31 +0000 (13:20 +0900)
those objects are linked to the corresponding string objects.
this may causes inconsistency that those objects has more values than them.

src/fcmatch.c

index 23f985a..7993b81 100644 (file)
@@ -532,7 +532,10 @@ FcFontRenderPrepare (FcConfig          *config,
     {
        pe = &FcPatternElts(pat)[i];
        fe = FcPatternObjectFindElt (font, pe->object);
-       if (!fe)
+       if (!fe &&
+           pe->object != FC_FAMILYLANG_OBJECT &&
+           pe->object != FC_STYLELANG_OBJECT &&
+           pe->object != FC_FULLNAMELANG_OBJECT)
        {
            FcPatternObjectListAdd (new, pe->object,
                                    FcValueListDuplicate (FcPatternEltValues(pe)),