FcBool FcListPatternMatchAny (const FcPattern *p, const FcPattern *font) { int i; for (i = 0; i < p->num; i++) { FcPatternElt *pe = &FcPatternElts(p)[i]; FcPatternElt *fe; if (pe->object == FC_NAMELANG_OBJECT) { /* "namelang" object is the alias object to change "familylang", * "stylelang" and "fullnamelang" object alltogether. it won't be * available on the font pattern. so checking its availability * causes no results. we should ignore it here. */ continue; } fe = FcPatternObjectFindElt (font, pe->object); if (!fe) return FcFalse; if (!FcListValueListMatchAny (FcPatternEltValues(pe), /* pat elts */ FcPatternEltValues(fe))) /* font elts */ return FcFalse; } return FcTrue; }
FcBool FcListPatternMatchAny (const FcPattern *p, const FcPattern *font) { int i; for (i = 0; i < p->num; i++) { FcPatternElt *pe = &FcPatternElts(p)[i]; FcPatternElt *fe = FcPatternObjectFindElt (font, pe->object); if (!fe) return FcFalse; if (!FcListValueListMatchAny (FcPatternEltValues(pe), /* pat elts */ FcPatternEltValues(fe))) /* font elts */ return FcFalse; } return FcTrue; }