diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 3cf1686..d93292d 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -935,8 +935,18 @@ FcStringContainsConst (const FcChar8 *string, int i; for (i = 0; i < nc; i++) - if (FcStrContainsIgnoreBlanksAndCase (string, c[i].name)) - return c[i].value; + { + if (c[i].name[0] == '<') + { + if (FcStrContainsWord (string, c[i].name + 1)) + return c[i].value; + } + else + { + if (FcStrContainsIgnoreBlanksAndCase (string, c[i].name)) + return c[i].value; + } + } return -1; } @@ -958,6 +968,8 @@ static const FcStringConst weightConsts[] = { { (FC8) "superbold", FC_WEIGHT_EXTRABOLD }, { (FC8) "ultrabold", FC_WEIGHT_ULTRABOLD }, { (FC8) "bold", FC_WEIGHT_BOLD }, + { (FC8) "= s2len) + { + if (wordStart && + FcStrIsAtIgnoreCase (s1, s2) && + (s1len == s2len || FcCharIsPunct (s1[s2len]))) + { + return s1; + } + wordStart = FcFalse; + if (FcCharIsPunct (*s1)) + wordStart = FcTrue; + s1++; + s1len--; + } + return 0; +} + const FcChar8 * FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2) {