(原創) 如何在Ubuntu中使用漂亮的中文字型? (OS) (Linux) (Ubuntu) (Web) (FireFox)
Abstract
Ubuntu的英文環境相當漂亮,可惜中文環境卻不甚美觀,該如何調整呢?
Introduction
目前Linux的distribution中,無論Ubuntu,或者CentOS,其英文環境都相當的漂亮,但中文環境卻不甚美觀,開啟FireFox瀏覽中文網頁,天啊!!竟然出現"楷書",整個心情頓時嚴肅了起來....
MacOS和Vista都相繼使用了黑體作為標準字體,的確,黑體大而清楚,讓人看起來相當舒服!!
已經有不少人討論如何在Ubuntu中顯示漂亮的中文字型,不過他們大都在中文Ubuntu環境下調整,這裡要討論的是如何在英文Ubuntu環境中調整中文字型,為什麼要在英文Ubuntu下呢?因為很多人還是習慣英文介面,只希望瀏覽網站或文書處理時偶而用到中文即可,大部分時間仍使用英文,所以沒有必要將整個Ubuntu使用中文介面.
Step 1:
下載cwTTF(GPL授權),包含宋體、楷體、圓體、黑體等
http://cle.linux.org.tw/fonts/cwttf/deb/
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwfs_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwheib_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwkai_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwming_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwyen_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwfs_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwheib_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwkai_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwming_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwyen_1.0-1_all.deb
sudo fc-cache -v
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwheib_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwkai_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwming_1.0-1_all.deb
wget http://cle.linux.org.tw/fonts/cwttf/deb/ttf-cwtex-center-cwyen_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwfs_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwheib_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwkai_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwming_1.0-1_all.deb
sudo dpkg -i ttf-cwtex-center-cwyen_1.0-1_all.deb
sudo fc-cache -v
Step 2:
設定FireFox
希望FireFox仍以sans-serif, serif這類字體為主,唯遇到utf-8編碼的中文網頁時,使用黑體顯示
sudo gedit /etc/fonts/conf.d/65-nonlatin.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>cwTeXHeiBold</family>
<family>Frank Ruehl</family>
<family>MgOpen Canonica</family>
<family>Kochi Mincho</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>MS 明朝</family>
<family>Baekmuk Batang</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>cwTeXHeiBold</family>
<family>Nachlieli</family>
<family>MgOpen Modata</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>AR PL KaitiM Big5</family>
<family>MS ゴシック</family>
<family>Baekmuk Dotum</family>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Miriam Mono</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>
</fontconfig>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>cwTeXHeiBold</family>
<family>Frank Ruehl</family>
<family>MgOpen Canonica</family>
<family>Kochi Mincho</family>
<family>AR PL SungtiL GB</family>
<family>AR PL Mingti2L Big5</family>
<family>MS 明朝</family>
<family>Baekmuk Batang</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>cwTeXHeiBold</family>
<family>Nachlieli</family>
<family>MgOpen Modata</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>AR PL KaitiM Big5</family>
<family>MS ゴシック</family>
<family>Baekmuk Dotum</family>
<family>SimSun</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Miriam Mono</family>
<family>Kochi Gothic</family>
<family>AR PL KaitiM GB</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>
</fontconfig>
在serif和sans-serif的prefer第一行皆加上
<family>cwTeXHeiBold</family>
Step 3:
sudo fc-cache -v
Step 4:
重新啟動firefox
Reference
Ubuntu – 中文字型設定
UbuntuL10n Wiki 安裝中文字型