Make FcPatternDuplicate copy the binding instead of always using Strong.
I noticed that Qt always uses a different font than fc-match advertises. Debugging the issue, I found that a call that looks pretty innocent is changing all weak bindings to strong bindings and as such changes the semantic of the match: FcPatternDuplicate.
This commit is contained in:
parent
2373f90426
commit
9b74b78fe8
|
@ -925,10 +925,14 @@ FcPatternDuplicate (const FcPattern *orig)
|
||||||
for (i = 0; i < orig->num; i++)
|
for (i = 0; i < orig->num; i++)
|
||||||
{
|
{
|
||||||
for (l = FcPatternEltValues(e + i); l; l = FcValueListNext(l))
|
for (l = FcPatternEltValues(e + i); l; l = FcValueListNext(l))
|
||||||
if (!FcPatternObjectAdd (new, e[i].object,
|
{
|
||||||
|
if (!FcPatternObjectAddWithBinding (new, e[i].object,
|
||||||
FcValueCanonicalize(&l->value),
|
FcValueCanonicalize(&l->value),
|
||||||
|
l->binding,
|
||||||
FcTrue))
|
FcTrue))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
|
|
Loading…
Reference in New Issue