[Fontconfig] How to make Arial support Vietnamese?

Qianqian Fang fangq at nmr.mgh.harvard.edu
Thu Sep 24 08:57:07 PDT 2009


I don't think it is that bad when dealing with CJKV languages.
You can find an example in the attachment from this link
https://bugzilla.redhat.com/show_bug.cgi?id=499902
such as this one
https://bugzilla.redhat.com/attachment.cgi?id=343148

you can even merge multiple edit blocks, or change binding
from same to "strong" (or prepend to prepend_first)

    <match>
        <test name="lang" compare="contains">
            <string>zh</string>
        </test>
        <test name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>DejaVu Sans</string>
            <string>Bitstream Vera Sans</string>
            <string>WenQuanYi Bitmap Song</string>
            <string>WenQuanYi Micro Hei</string>
            <string>WenQuanYi Zen Hei</string>
            <string>AR PL UMing CN</string>
        </edit>
    </match>



Pat Suwalski wrote:
> Nguyen Thai Ngoc Duy wrote:
>   
>> I would like to make arial the prefered Sans font in my system. It
>> works great if I use locale C. If I use locale vi_VN.UTF-8 then it
>> fails to recognize Vietnamese is supported by Arial and pass on. Is
>> there anyway to make it work? I'm using fontconfig 2.7.2.
>>     
>
> This is one of the more annoying aspects of fontconfig when dealing with 
> Asian locales. I made a similar rule to prefer the Latin characters in 
> the DejaVu fonts over the ones in a Chinese font, when in a Chinese 
> locale. Naturally, the Chinese font supported Chinese character sets, so 
> it was chosen.
>
> 	<match target="pattern">
> 		<test qual="any" name="family">
> 			<string>sans-serif</string>
> 		</test>
> 		<edit name="family" mode="append" binding="same">
> 			<string>DejaVu Sans</string>
> 		</edit>
> 	</match>
>
> 	<match target="pattern">
> 		<test qual="any" name="family">
> 			<string>serif</string>
> 		</test>
> 		<edit name="family" mode="append" binding="same">
> 			<string>DejaVu Serif</string>
> 		</edit>
> 	</match>
>
> 	<match target="pattern">
> 		<test qual="any" name="family">
> 			<string>monospace</string>
> 		</test>
> 		<edit name="family" mode="append" binding="same">
> 			<string>DejaVu Sans Mono</string>
> 		</edit>
> 	</match>
>
> Basically, it forces the three DejaVu fonts to the top of the 
> substitution list.
>
> Initially, I was using "strong" bindings, but that broke Flash 9 at the 
> time. I don't know if it would still break Flash 10.
>
> --Pat
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fontconfig
>
>
>
>   



More information about the Fontconfig mailing list