[Fontconfig-bugs] [Bug 33644] Fontconfig doesn't match correctly in <test>

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 2 01:56:16 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=33644

--- Comment #12 from Akira TAGOH <akira at tagoh.org> 2012-04-02 01:56:16 PDT ---
(In reply to comment #11)
> Thanks for responding.  But I do not quiet understand what you means.
> 
> Rule is
>         <match target="pattern">
>                 <test name="family">
>                         <string>Courier</string>
>                         <string>Courier New</string>
>                 </test>
>                 <edit binding="strong" mode="prepend" name="family">
>                         <string>monospace</string>
>                 </edit>
>         </match>
> 
> Suppose we do
> $ fc-match "Courier New"
> 
> The query before the rule apply is [ .. "Courier New" .. ].
> 
> Why after the rule applied, monospace is not added before "Courier New"?

Because you probably have "Courier" in the pattern and your rule tries to test
it first. fontconfig finds it out earlier than "Courier New" and apply the edit
pattern to it then. the bad news for you is "Courier" appears after "Courier
New". so your pattern after FcConfigSubstitute() should looks like the pseudo
array in comment#9.

You can see with FC_DEBUG=4 fc-match ... what happened there.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Fontconfig-bugs mailing list