]> git.wh0rd.org Git - fontconfig.git/commitdiff
Make FcPatternDuplicate copy the binding instead of always using Strong.
authorStephan Kulow <coolo@novell.com>
Mon, 12 Mar 2007 17:21:35 +0000 (10:21 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Mon, 12 Mar 2007 17:21:35 +0000 (10:21 -0700)
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.

src/fcpat.c

index 052874ffbbf5f4077fb6508250ea064af736282e..4179694d87aef448013e1a9e74c5ec3c494cb6b9 100644 (file)
@@ -925,10 +925,14 @@ FcPatternDuplicate (const FcPattern *orig)
     for (i = 0; i < orig->num; i++)
     {
        for (l = FcPatternEltValues(e + i); l; l = FcValueListNext(l))
-           if (!FcPatternObjectAdd (new, e[i].object,
-                                    FcValueCanonicalize(&l->value),
-                                    FcTrue))
+       {
+           if (!FcPatternObjectAddWithBinding (new, e[i].object,
+                                               FcValueCanonicalize(&l->value),
+                                               l->binding,
+                                               FcTrue))
                goto bail1;
+           
+       }
     }
 
     return new;