diff options
Diffstat (limited to 'fontconfig/src/fcmatch.c')
-rw-r--r-- | fontconfig/src/fcmatch.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c index 0c0a0670e..78255186f 100644 --- a/fontconfig/src/fcmatch.c +++ b/fontconfig/src/fcmatch.c @@ -245,16 +245,8 @@ FcCompareFilename (FcValue *v1, FcValue *v2) return 3.0; } -static double -FcCompareHash (FcValue *v1, FcValue *v2) -{ - const FcChar8 *s1 = FcValueString (v1), *s2 = FcValueString (v2); - /* Do not match an empty string */ - if (!s1 || !s2 || !s1[0] || !s2[0]) - return 1.0; - return FcCompareString (v1, v2); -} +/* Define priorities to -1 for objects that don't have a compare function. */ #define PRI_NULL(n) \ PRI_ ## n ## _STRONG = -1, \ @@ -269,7 +261,6 @@ FcCompareHash (FcValue *v1, FcValue *v2) #define PRI_FcCompareCharSet(n) PRI1(n) #define PRI_FcCompareLang(n) PRI1(n) #define PRI_FcComparePostScript(n) PRI1(n) -#define PRI_FcCompareHash(n) PRI1(n) #define PRI_FcCompareSizeRange(n) PRI1(n) #define FC_OBJECT(NAME, Type, Cmp) PRI_##Cmp(NAME) @@ -280,6 +271,9 @@ typedef enum _FcMatcherPriorityDummy { #undef FC_OBJECT + +/* Canonical match priority order. */ + #undef PRI1 #define PRI1(n) \ PRI_ ## n, \ @@ -287,7 +281,6 @@ typedef enum _FcMatcherPriorityDummy { PRI_ ## n ## _WEAK = PRI_ ## n typedef enum _FcMatcherPriority { - PRI1(HASH), PRI1(FILE), PRI1(FONTFORMAT), PRI1(SCALABLE), |