Hing-Wah Wan
2005-Nov-21 08:50 UTC
[Fontconfig] Changing the binding of family name without changing family name
Hi, I have some display problem that english letter is displayed using chinese fonts which look ugly with the configuration such as this: <alias> <family>Font1</family> <family>Font2</family> <family>Font3</family> <family>Font4</family> <family>Font5</family> ..... <default><family>sans-serif</family></default> </alias> <alias> <family>sans-serif</family> <prefer> <family>Verdana</family> <family>MingLiU</family> </prefer> </alias> The problem of this is because I have a locale of zh_TW.Big5 and "lang=zh-tw" properties will be added to the pattern to be substitued. The substitution of family name have a weak binding instead of strong binding so that MingLiU will have higher score and used to render english fonts since lang element have higher order than family name.To solve the issue, i added this: <match target="pattern"> <test qual="any" name="family" compare="eq"> <string>Verdana</string> </test> <edit name="family" mode="assign" binding="strong"> <string>Verdana</string> </edit> </match> However,this need also to be applied to Font1,Font2,Font3.Instead of writting duplicate match statement by replacing "Verdana" with "Font1/Font2/Font3.." . Is that any way to change the binding without reassigning family name with same value,so that only one single match statement need to be written? Thanks