cd /usr/share/fonts/truetype
sudo mkdir cnfonts
sudo cp /home/*/*.ttf /usr/share/fonts/truetype/cnfonts/
sudo fc-cache -fv
sudo reboot
sudo gedit /etc/fonts/conf.d/67-simsun-sharp.conf
and paste the code below:
<?xml version=”1.0″?>
<!DOCTYPE fontconfig SYSTEM “fonts.dtd”>
<!– SimSun Configure File –>
<fontconfig>
<match target=”font”>
<test qual=”any” name=”family”>
<string>SimSun</string>
<string>宋体</string>
<string>NSimSun</string>
<string>新宋体</string>
</test>
<test name=”weight” compare=”less_eq” target=”pattern”>
<const>medium</const>
</test>
<test compare=”less_eq” name=”pixelsize”><double>17</double></test>
<test compare=”more_eq” name=”pixelsize”><double>12</double></test>
<edit name=”antialias” mode=”assign”><bool>false</bool></edit>
<edit name=”embeddedbitmap” mode=”assign”><bool>true</bool></edit>
<edit name=”hinting” mode=”assign”><bool>true</bool></edit>
<edit name=”hintstyle” mode=”assign”><const>hintfull</const></edit>
<edit name=”autohint” mode=”assign” ><bool>false</bool>
</edit>
</match>
</fontconfig>
Alt+PrtSc+K reboot the X windows
cd /etc/fonts/conf.d
sudo ln -s /etc/fonts/conf.avail/69-language-selector-zh-cn.conf
sudo ln -s /etc/fonts/conf.avail/99-language-selector-zh.conf
修改配置文件
sudo gedit /etc/fonts/conf.d/69-language-selector-zh-cn.conf
添加 YaHei Consolas Hybrid (这个是字体的名字,不是字体的文件名,双击字体文件可以查看字体名)共有三处,都要添加
例如:
YaHei Consolas Hybrid
Bitstream Vera Sans Mono
DejaVu Sans Mono
WenQuanYi Zen Hei
AR PL UMing CN
AR PL ShanHeiSun Uni
WenQuanYi Bitmap Song
AR PL UKai CN
AR PL ZenKai Uni
若想用WenQuanYi字体,就把文泉驿的字体放在DejaVu Serif和Bitstream Vera Serif两种英文字体之后,其他中文字体之前即可。