Revert "[fcmatch] When matching, reserve score 0 for when elements don't exist"
This reverts commit a5a384c5ff
.
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
This commit is contained in:
parent
f094539687
commit
286cdc9c10
|
@ -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++)
|
||||
|
|
Loading…
Reference in New Issue