Sunday, March 23, 2014

Ubuntu 12.04: Change Default Chinese Font to WenQuanYi Micro Hei

sudo vi /etc/fonts/conf.avail/69-language-selector-zh-cn.conf

This is a fall-back list of font settings for zh-cn language. First two are for western characters. The bolded line shows the change.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

 <match target="pattern">
  <test qual="any" name="family">
   <string>serif</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>DejaVu Serif</string>
   <string>Bitstream Vera Serif</string>
   <string>WenQuanYi Micro Hei</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>WenQuanYi Bitmap Song</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 
 <match target="pattern">
  <test qual="any" 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 Micro Hei</string>
   <string>WenQuanYi Zen Hei</string>
   <string>Droid Sans Fallback</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 
 <match target="pattern">
  <test qual="any" name="family">
   <string>monospace</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>DejaVu Sans Mono</string>
   <string>Bitstream Vera Sans Mono</string>
   <string>WenQuanYi Micro Hei Mono</string>
   <string>WenQuanYi Zen Hei Mono</string>
   <string>Droid Sans Fallback</string>
   <string>HYSong</string>
   <string>AR PL UMing CN</string>
   <string>AR PL UMing HK</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL New Sung</string>
   <string>AR PL UKai CN</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
 </match> 

</fontconfig>

No comments:

Post a Comment