[Fontconfig] fontconfig: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Aug 20 12:26:12 PDT 2014


 src/fcmatch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 286cdc9c10b0453c25950103b6a1f7170d15bfdc
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 20 15:23:04 2014 -0400

    Revert "[fcmatch] When matching, reserve score 0 for when elements don't exist"
    
    This reverts commit a5a384c5ffb479e095092c2aaedd406f8785280a.
    
    I don't remember what I had in mind for "We will use this property later.", but
    the change was wrong.  If a font pattern doesn't have any value for element,
    it must be interpretted as "it matches any value perfectly.  And "perfectly"
    must have a score of 0 for that to happen.
    
    This was actually affecting bitmap fonts (in a bad way), as the change made
    an outline font to always be preferred over a (otherwise equal) bitmap font,
    even for the exact size of the bitmap font.  That probably was never noticed
    by anyone, but with the font range support this has become clear (and worked
    around by Akira).  To clean that up, I'm reverting this so I can land the
    rest of patches for bug 80873.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=80873#c10

diff --git a/src/fcmatch.c b/src/fcmatch.c
index b0e695d..25081e2 100644
--- a/src/fcmatch.c
+++ b/src/fcmatch.c
@@ -375,7 +375,7 @@ FcCompareValueList (FcObject	     object,
     best = 1e99;
     bestStrong = 1e99;
     bestWeak = 1e99;
-    j = 1;
+    j = 0;
     for (v1 = v1orig; v1; v1 = FcValueListNext(v1))
     {
 	for (v2 = v2orig, k = 0; v2; v2 = FcValueListNext(v2), k++)


More information about the Fontconfig mailing list