Created attachment 27862 [details] Bugged file FC 2.7 ignores lang test in ~/.fonts.conf and strongbinds first <edit> see attachment
How is the attachment supposed to show the bug!?
He sent me this note: "If you setup the attachment as your ~/.fonts.conf you would see font from the first match tag being set as default sans-serif for every language, omiting lang test condition."
Unless you attach a much shorter conf file that I can verify, I assume there's a bug in your conf file.
Created attachment 28941 [details] New .fonts.conf
For starter, the match should target="pattern", not target="font".
Same results
Ok, I found the bug. Currently <alias> doesn't work inside tests. <alias> is a syntactic sugar though, if you use the full form, it works: <match target="pattern"> <test name="lang"> <string>ja</string> </test> <test name="family"><string>sans-serif</string></test> <edit name="family" mode="prepend"><string>MS Mincho</string></edit> </match> I'll fix the alias later. Thanks for your patience.
Would we have syntactic sugar by the next release?
I don't get to work on this until January. Needs a bit of restructuring of the internal code that I'm not really comfortable with right now.
proposed fix: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz22862 I guess that may be much better if we use the reference counted objects for FcTest and FcExpr as well as FcSharedStr perhaps.
simplified patch and merged in ddefa502.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.