Fix FcFontList doesn't return a font with FC_COLOR=true

"color" property has a value more than 1 because the value of FT_HAS_COLOR
is directly set to it. this seems breaking the behavior of FcFontList with FC_COLOR=true
because it is more than FcDontCare.

So changing comparison that way.
This commit is contained in:
Akira TAGOH 2018-11-27 08:50:18 +00:00
parent 3c75a5a935
commit 9d5149ac41
1 changed files with 6 additions and 6 deletions

View File

@ -821,25 +821,25 @@ FcConfigCompareValue (const FcValue *left_o,
break;
case FcOpContains:
case FcOpListing:
ret = left.u.b == right.u.b || left.u.b == FcDontCare;
ret = left.u.b == right.u.b || left.u.b >= FcDontCare;
break;
case FcOpNotEqual:
ret = left.u.b != right.u.b;
break;
case FcOpNotContains:
ret = !(left.u.b == right.u.b || left.u.b == FcDontCare);
ret = !(left.u.b == right.u.b || left.u.b >= FcDontCare);
break;
case FcOpLess:
ret = left.u.b != right.u.b && right.u.b == FcDontCare;
ret = left.u.b != right.u.b && right.u.b >= FcDontCare;
break;
case FcOpLessEqual:
ret = left.u.b == right.u.b || right.u.b == FcDontCare;
ret = left.u.b == right.u.b || right.u.b >= FcDontCare;
break;
case FcOpMore:
ret = left.u.b != right.u.b && left.u.b == FcDontCare;
ret = left.u.b != right.u.b && left.u.b >= FcDontCare;
break;
case FcOpMoreEqual:
ret = left.u.b == right.u.b || left.u.b == FcDontCare;
ret = left.u.b == right.u.b || left.u.b >= FcDontCare;
break;
default:
break;