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:
parent
3c75a5a935
commit
9d5149ac41
12
src/fccfg.c
12
src/fccfg.c
|
@ -821,25 +821,25 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
break;
|
break;
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
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;
|
break;
|
||||||
case FcOpNotEqual:
|
case FcOpNotEqual:
|
||||||
ret = left.u.b != right.u.b;
|
ret = left.u.b != right.u.b;
|
||||||
break;
|
break;
|
||||||
case FcOpNotContains:
|
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;
|
break;
|
||||||
case FcOpLess:
|
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;
|
break;
|
||||||
case FcOpLessEqual:
|
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;
|
break;
|
||||||
case FcOpMore:
|
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;
|
break;
|
||||||
case FcOpMoreEqual:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue