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;
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue