這三個字體。
sudo mkdir -p /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/simsun.ttc /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/tahoma.ttf /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/tahomabd.ttf /usr/share/fonts/zh_CN/TrueType/
sudo chmod 644 /usr/share/fonts/zh_CN/TrueType/*
cd /usr/share/fonts/zh_CN/TrueType/
sudo mkfontscale
sudo mkfontdir
上面藍色部分的命令要根據自己WINDOWS系統分區位置的實際情況來調整。
然後更新字體列表:
sudo fc-cache /usr/share/fonts/zh_CN/TrueType/
通過替換/etc/fonts/language-selector.conf來配置字體,只有這麼配置後,才能達到美化的效果,不要更改/etc/fonts/fonts.conf。但需要注意的是,Ubuntu 8.04 中是沒有language-selector.conf這個文件的。應修改/etc/fonts/conf.d/69-language-selector-zh-cn.conf和/etc/fonts/conf.d/99-language-selector-zh.conf
如果 /etc/fonts/conf.d/下沒有這兩個文件可建立連接
sudo ln -s /etc/fonts/conf.avail/69-language-selector-zh-cn.conf /etc/fonts/conf.d/ sudo ln -s /etc/fonts/conf.avail/99-language-selector-zh.conf /etc/fonts/conf.d/
最後在這兩個文件中把內容全部替換成如下:
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Bitstream Vera Serif</family>
<family>SimSun</family>
<family>DejaVu Serif</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Bitstream Vera Sans</family>
<family>SimSun</family>
<family>DejaVu Sans</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Bitstream Vera Sans Mono</family>
<family>DejaVu Sans Mono</family>
<family>SimSun</family>
</prefer>
</alias>
<match target="font" >
<test name="family" compare="contains" >
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test compare="more_eq" target="pattern" name="weight" >
<int>180</int> </test>
<edit mode="assign" name="embolden" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<test name="family" compare="contains" >
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<edit name="globaladvance">
<bool>false</bool>
</edit>
<edit name="spacing">
<int>0</int>
</edit>
<edit name="hinting">
<bool>true</bool>
</edit>
<edit name="autohint">
<bool>false</bool>
</edit>
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<test name="pixelsize" compare="less_eq">
<int>18</int>
</test>
<edit name="antialias" mode="assign" >
<bool>false</bool>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>SimSun</string>
<string>SimSun-18030</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>MingLiU</string> <string>PMingLiU</string>
</test>
<edit binding="strong" mode="prepend" name="family"> <string>Tahoma</string>
<string>Verdana</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>宋體</string>
</test>
<edit name="family" mode="assign">
<string>SimSun</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>新宋體</string>
</test>
<edit name="family" mode="assign">
<string>SimSun</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>仿宋_GB2312</string>
</test>
<edit name="family" mode="assign">
<string>FangSong_GB2312</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>楷體_GB2312</string>
</test>
<edit name="family" mode="assign">
<string>KaiTi_GB2312</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>黑體</string></test>
<edit name="family" mode="assign">
<string>SimHei</string>
</edit>
</match>
</fontconfig>
在字體選項中即可使用剛剛配置好的字體。
重啟X Window。