diff --git a/src/fcmatch.c b/src/fcmatch.c index 40efbd3..022fe27 100644 --- a/src/fcmatch.c +++ b/src/fcmatch.c @@ -155,39 +155,6 @@ FcCompareCharSet (FcValue *v1, FcValue *v2) return (double) FcCharSetSubtractCount (FcValueCharSet(v1), FcValueCharSet(v2)); } -static double -FcCompareSize (FcValue *value1, FcValue *value2) -{ - double v1, v2, v; - - switch ((int) value1->type) { - case FcTypeInteger: - v1 = value1->u.i; - break; - case FcTypeDouble: - v1 = value1->u.d; - break; - default: - return -1; - } - switch ((int) value2->type) { - case FcTypeInteger: - v2 = value2->u.i; - break; - case FcTypeDouble: - v2 = value2->u.d; - break; - default: - return -1; - } - if (v2 == 0) - return 0; - v = v2 - v1; - if (v < 0) - v = -v; - return v; -} - static double FcCompareSizeRange (FcValue *v1, FcValue *v2) { @@ -255,7 +222,6 @@ FcCompareFilename (FcValue *v1, FcValue *v2) #define PRI_FcCompareFamily(n) PRI1(n) #define PRI_FcCompareString(n) PRI1(n) #define PRI_FcCompareNumber(n) PRI1(n) -#define PRI_FcCompareSize(n) PRI1(n) #define PRI_FcCompareBool(n) PRI1(n) #define PRI_FcCompareFilename(n) PRI1(n) #define PRI_FcCompareCharSet(n) PRI1(n) diff --git a/src/fcobjs.h b/src/fcobjs.h index d27864b..96dc646 100644 --- a/src/fcobjs.h +++ b/src/fcobjs.h @@ -33,7 +33,7 @@ FC_OBJECT (WEIGHT, FcTypeInteger, FcCompareNumber) FC_OBJECT (WIDTH, FcTypeInteger, FcCompareNumber) FC_OBJECT (SIZE, FcTypeRange, FcCompareSizeRange) FC_OBJECT (ASPECT, FcTypeDouble, NULL) -FC_OBJECT (PIXEL_SIZE, FcTypeDouble, FcCompareSize) +FC_OBJECT (PIXEL_SIZE, FcTypeDouble, FcCompareNumber) FC_OBJECT (SPACING, FcTypeInteger, FcCompareNumber) FC_OBJECT (FOUNDRY, FcTypeString, FcCompareString) FC_OBJECT (ANTIALIAS, FcTypeBool, FcCompareBool)