主要來自wiki,節錄一份,免得忘記
那些<,>符號是英文全形
安裝 Opendesktop 字型
wget ftp://ftp.opendesktop.org.tw/odp/ODOFonts/OpenFonts/opendesktop-fonts-1.4.2.tar.gz
tar xvzf opendesktop-fonts-1.4.2.tar.gz
cd opendesktop-fonts-1.4.2
sudo cp odosung.ttc odokai-ExtB.ttf odokai.ttf odosung-ExtB.ttf /usr/local/share/fonts
sudo fc-cache -v
* 重新啟動 X-Window
* 您可以透過 Gnome 面板上的[系統]->[偏好設定]->[字型],將字型更改為 AR PL New Sung ,中文顯示會美觀許多。
[編輯]
安裝 cwTTF 字型
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
* 重新啟動 X-Window
[編輯]
中文 fontconfig 設定檔
入門指導與更多細節,請見 如何運用 fontconfig 自訂字體 (http://wiki.ubuntu.org.tw/index.php/HowtoCustomFontswithFontconfig)
* Ubuntu 用戶:
sudo gedit /etc/fonts/conf.d/10-myfonts.conf
* Kubuntu 用戶:
kdesu kwrite /etc/fonts/conf.d/10-myfonts.conf
內容如下:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- conf.d/myfont.conf -->
<fontconfig>
<dir>/usr/share/fonts</dir>
<dir>/usr/share/fonts/local</dir>
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
<!--加入點陣字體路徑-->
<dir>/usr/X11R6/lib/X11/fonts</dir>
<!--所有字型預設樣式-->
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
</match>
<!--打開中文粗體-->
<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>
<!-- 關閉小字AA -->
<match target="font">
<test name="pixelsize" compare="less">
<double>12</double>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
<!-- 關閉宋體、明體小字AA -->
<match target="font">
<test name="family" compare="contains">
<string>Song</string>
<string>Sun</string>
<string>Ming</string>
</test>
<test name="pixelsize" compare="less_eq">
<double>20</double>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
<!-- 解決中文字體英文間距過寬 -->
<match target="font">
<test target="pattern" name="lang" compare="contains">
<string>zh-tw</string>
<string>zh-cn</string>
<string>ja</string>
<string>ko</string>
</test>
<edit name="spacing">
<const>proportional</const>
</edit>
<edit name="globaladvance">
<bool>false</bool>
</edit>
</match>
<!--設定中文最小字號-->
<match target="font">
<test name="family" compare="contains">
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test name="pixelsize" compare="more_eq">
<double>8</double>
</test>
<test name="pixelsize" compare="less_eq">
<double>12</double>
</test>
<edit name="pixelsize" compare="eq">
<double>12</double>
</edit>
</match>
<!--適應中文用戶的用字習慣-->
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
<family>Times New Roman</family>
<family>Times</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>Kochi Mincho</family>
<family>UnBatang</family>
<family>Baekmuk Batang</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Lucida Grande</family>
<family>Helvetica</family>
<family>Arial</family>
<family>Verdana</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL New Kai</family>
<family>AR PL ZenKai Uni</family>
<family>Kochi Gothic</family>
<family>UnDotum</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>Andale Mono</family>
<family>Courier New</family>
<family>Courier</family>
<family>AR PL New Sung Mono</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>Kochi Gothic</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>
<alias>
<family>新細明體</family>
<prefer>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
</prefer>
</alias>
<alias>
<family>標楷體</family>
<prefer>
<family>AR PL New Kai</family>
<family>AR PL KaitiM Big5</family>
<family>AR PL KaitiM GB</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>
</fontconfig>
沒有留言:
張貼留言