I'm not quite sure if this is really a bug or a feature. so please close if it's inappropriate. I'm trying following rule for testing: <match> <test name="lang"> <string>ja</string> </test> <edit name="family" mode="append"> <string>bogus fonts</string> </edit> </match> with the pattern of :lang=en. let's see how fontconfig processes it: $ FC_DEBUG=4 fc-match :lang=en ... Add Subst match pattern any lang Equal "ja" edit Edit family Append "bogus fonts"; ... FcConfigSubstitute Pattern has 1 elts (size 16) lang: en(s) ... FcConfigSubstitute test pattern any lang Equal "ja" Substitute match pattern any lang Equal "ja" edit Edit family Append "bogus fonts"; Append list before [snip] "monospace"(w) Append list after [snip] "monospace"(w) "bogus fonts"(w) FcConfigSubstitute editPattern has 2 elts (size 16) family: [snip] "monospace"(w) "bogus fonts"(w) lang: en(s) This behaviour looks weird to me. lang "en" should not be EQUAL to lang "ja".
I'm guessing that you have other config files around that are adding 'ja' to lang.
(In reply to comment #1) > I'm guessing that you have other config files around that are adding 'ja' to > lang. for "bogus fonts"?, no. it's just a testcase and not expecting how it looks like on the applications, but wanted to make a minimal testcase that looks similar on the debugging log. so I did exactly write "bogus fonts" as a font name like the above example. not having anything else rules for "bogus fonts".
I've tracked this issue down. the lang wasn't set in FcLangSetPromote() due to the invalid map_size. it has to be initialized anyway. the proposed one-line patch is here: http://cgit.freedesktop.org/~tagoh/fontconfig/commit/?h=bz28958&id=5759eafcf5cb9cc5b69317f26d2e930ff54ee60c
Doh! Thanks. Fixed!
*** Bug 25670 has been marked as a duplicate of this bug. ***
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.