From 9d5149ac41e18ab67404ddba41d7ef7e71839ebc Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 27 Nov 2018 08:50:18 +0000 Subject: [PATCH] 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. --- src/fccfg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/fccfg.c b/src/fccfg.c index 890991f..a87dfec 100644 --- a/src/fccfg.c +++ b/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;