]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcmatch.c
Various config changes plus a couple of optimizations from Owen
[fontconfig.git] / src / fcmatch.c
index 02b739c6ac0a3ab2c1f62881696a7500d003047c..3853cb7b4b9f7407921d02bd0258a81df493b709 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.15 2002/06/29 20:31:02 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.17 2002/08/11 18:10:42 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -384,26 +384,12 @@ FcFontRenderPrepare (FcConfig         *config,
        pe = FcPatternFindElt (pat, fe->object);
        if (pe)
        {
-           int     j;
-           double  score[NUM_MATCH_VALUES];
-
-           for (j = 0; j < NUM_MATCH_VALUES; j++)
-               score[j] = 0;
            if (!FcCompareValueList (pe->object, pe->values, 
-                                    fe->values, &v, score, &result))
+                                    fe->values, &v, 0, &result))
            {
                FcPatternDestroy (new);
                return 0;
            }
-           for (j = 0; j < NUM_MATCH_VALUES; j++)
-               if (score[j] >= 100.0)
-               {
-                   FcValueList *pv;
-
-                   for (pv = pe->values; pv; pv = pv->next)
-                       FcPatternAdd (new, fe->object, pv->value, FcTrue);
-                   break;
-               }
        }
        else
            v = fe->values->value;
@@ -416,7 +402,7 @@ FcFontRenderPrepare (FcConfig           *config,
        if (!fe)
            FcPatternAdd (new, pe->object, pe->values->value, FcTrue);
     }
-    FcConfigSubstitute (config, new, FcMatchFont);
+    FcConfigSubstituteWithPat (config, new, pat, FcMatchFont);
     return new;
 }