hi Nicolas<br><br>the syntax described in <a href="http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig" target="_blank">Fonts/Packaging/Fontconfig</a> seems not sufficient<br>to accomplish the desired substitution rules.
<br><br>First, we want to set wqy-bitmap-fonts as the default font for displaying Chinese characters (for example U4E00-U9FA5, and U3400-U4D86 and some punctuations), for all aliases (sans/serif/mono), and all locales (maybe except ja/ko), only at 10px to 16px. This can not be done with <alias><prefer></prefer></alias> syntax (I just tested, it used the Latin part in wqy-bitmap-fonts in mono, and can not use Uming/ukai for above/below 10-16px, both of these are bad).
<br><br>Second, I want the system preferred Latin fonts to display the non-CJK part. The provided syntax, in my own opinion, can not do this either.<br><br>You mention "no business touching non CJK locales," I don't fully agree. The default fontconfig setup for rendering Chinese webpages under non-zh locales is terrible. You can test this using en or other non CJK locales, by browsing 
<a href="http://wenq.org">http://wenq.org</a> , you will see a mixed text rendered by Japanese fonts, uming, ukai and some Japanese/Korean bitmap X core fonts. In my opinion, that is non-usable. To tell the truth, en_US is my default locale for both office and at home. I don't want my desktop looks non-legible by my colleagues. However, I do want it to process Chinese properly. Most my Chinese friends working in the US have the same set up for the same reason. The default en (or non CJK) Chinese rendering does need to be improved (it might be more appropriate to handle this with Fedora font committee or some sort, but improving the situation by installing an additional font package may not a bad solution either: those who don't like it just uninstall this font, and everything will back to the default way).
<br><br>Last, the link that you mentioned does look promising:<br><a href="http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig#local-specific-default-font-overrides">http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig#local-specific-default-font-overrides
</a><br>However, my question is, how can I make sure that the preferred Latin fonts (not necessarily Vera/Dejavu, could be something that user chose as in Andreas's case in bug #381311) overrides the Latin part of wqy?
<br><br>Thank you and I would be glad to hear further instructions.<br><br>Qianqian<br><br><br><div class="gmail_quote">On Nov 24, 2007 9:21 AM, Nicolas Mailhot <<a href="mailto:nicolas.mailhot@gmail.com">nicolas.mailhot@gmail.com
</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Le vendredi 23 novembre 2007 à 23:25 -0500, Qianqian Fang a écrit :<br>
<br>Hi Qianqian,<br><div class="Ih2E3d"><br>> 4. Questions<br>><br>> That's all I want to learn from you: do you see a robust implementation<br>> of fontconfig font selection mechanism to achieve my goals above?
<br>> if yes, how? if no, to whom should I file bug reports to?<br><br></div>I'm not sure if I've assimilated all your goals, but here are some<br>comments on your fontconfig file:<br><br>> <?xml version="
1.0"?><br>> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br><br>You probably want ../fonts.dtd there but that's general XML fontconfig<br>brokenness most everyone is guilty of.<br><br>>     <match target="pattern">
<br><br>I suppose this is protected by the selectfont pattern before but I'd<br>avoid playing any complex substitution games when the name of an<br>existing on-system font is given, and only substitute either fonts not
<br>available at all or synthetic fonts like sans-serif and friends.<br><br>Also, please use a simple match with a test for family inside instead of<br>this pattern indirection, as documented on:<br><a href="http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig" target="_blank">
http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig</a><br><br>>         <test equal="any" compare="eq" name="lang"><br><br>>                 <string>en</string>
<br>>                 <string>en-us</string><br><br>You have no business touching non CJK locales, please remove this. If<br>for some reason an app does not tag text with the correct locale,<br>complain to its authors.
<br><br><a href="http://fedoraproject.org/wiki/SIGs/Fonts/Dev/LanguageAwarenessProblem" target="_blank">http://fedoraproject.org/wiki/SIGs/Fonts/Dev/LanguageAwarenessProblem</a><br><br>These two lines are probably responsible for most of your problem
<br>reports.<br><br>>                 <string>zh-cn</string><br>>                 <string>zh-tw</string><br>>                 <string>zh-hk</string><br>>                 <string>zh-sg</string>
<br>>         </test><br><br>>         <test compare="more_eq" name="pixelsize"><br>>                 <double>11</double><br>>         </test><br>>         <test compare="less_eq" name="pixelsize">
<br>>                 <double>16</double><br>>         </test><br><br>Are you sure of the 11-16 pixel range?<br><br>>         <edit name="family" mode="prepend_first"><br>
>                 <string>WenQuanYi Bitmap Song</string><br>>         </edit><br>>     </match><br><br>>     <match target="pattern"><br><br>[…]<br><br>>         <test compare="more_eq" name="size">
<br>>                 <double>8</double><br>>         </test><br>>         <test compare="less_eq" name="size"><br>>                 <double>12</double><br>
>         </test><br><br>Point sizes have no meaning for bitmap fonts, unless you assume a fixed<br>point/pixel ratio, which is not hardware reality. Dump this match block<br>it's actively evil.<br><br>>         <edit name="family" mode="prepend_first">
<br>>                 <string>WenQuanYi Bitmap Song</string><br>>         </edit><br>>    </match><br><br><br>>     <match target="pattern"><br>>         <test equal="any" compare="eq" name="family">
<br>>                 <string>WenQuanYi Bitmap Song</string><br>>         </test><br>>         <test equal="any" compare="eq" name="family"><br>>                 <string>monospace</string>
<br>>         </test><br>>         <edit name="family" mode="prepend"><br>>                 <string>Bitstream Vera Sans Mono</string><br>>         </edit><br>>         <edit name="family" mode="prepend" binding="strong">
<br>>                 <string>DejaVu LGC Sans Mono</string><br>>         </edit><br>>     </match><br><br>If you didn't touch non-CJK locales before you wouldn't need this<br>bandaid. Also you're assuming some other fonts are present on system
<br>which may not be the case. Our default latin font list is dynamic and<br>changes from release to release, and depending on what font packages<br>users actually install.<br><br>If you really want Vera or DejaVu to override WenQuanYi Bitmap Song
<br>contents, the override should be added to the fontconfig file those<br>fonts ship.<br><br>Wouldn't a simple<br><a href="http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig#local-specific-default-font-overrides" target="_blank">
http://fedoraproject.org/wiki/SIGs/Fonts/Packaging/Fontconfig#local-specific-default-font-overrides</a><br>rule with additional pixel range restriction be sufficient for your<br>needs?<br><br><br>Regards,<br><br>--<br><font color="#888888">
Nicolas Mailhot<br></font></blockquote></div><br>