« Excel VBA 程式分享: 即時檢查地址正確性 | 首頁 | 關於 Windows XP 的三個備忘 »
2005年11月17日
讓 Ubuntu GNOME 桌面顯示清晰中文字
環境:
- Ubuntu 5.10 (Breezy Badger) kernel 2.6.12-9-386
- GNOME Desktop Environment
- 安裝時預設語系: 英文
步驟:
1. 下載 Firefly AR PL New Sun (文鼎PL新宋) 字型
wget http://cle.linux.org.tw/fonts/FireFly/fireflysung-1.3.0.tar.gz
2. 解包字型至 /usr/share/fonts 路徑中
cd /usr/share/fonts
tar -zxf /path/to/fireflysung-1.3.0.tar.gz
3. 修改 /etc/fonts/fonts.conf 設定檔
vi /etc/fonts/fonts.conf
在每個 <alias>...</alias> 裡面的第一個 <family>AR PL xxx</family> 之前加入:
<family>AR PL New Sung</family>
4. 建立 /etc/fonts/local.conf 設定檔 (17px 以上的中文字才反鋸齒)
vi /etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Disable antialias feature of AR PL New Sung when pixelsize less than 17 -->
<match target="font">
<test name="family"><string>AR PL New Sung</string></test>
<edit name="antialias"><bool>false</bool></edit>
<edit name="hinting"><bool>true</bool></edit>
<edit name="autohint"><bool>false</bool></edit>
</match>
<match target="font">
<test name="family"><string>AR PL New Sung</string></test>
<test name="pixelsize" compare="more_eq"><int>17</int></test>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
</match>
</fontconfig>
5. 修改語系設定
vi /etc/locale.gen
加入:
zh_TW BIG5
zh_TW.UTF-8 UTF-8vi /etc/environment
LANG="zh_TW.UTF-8" (設定預設語系; 亦可選用 big5 編碼: zh_TW 或 zh_TW.BIG5)
LANGUAGE="zh_TW:zh"locale-gen
以上三個動作可由這個指令取代: dpkg-reconfigure locales
7. 中文化 GNOME 環境
系統選單、應用程式
apt-get install language-pack-gnome-zh-base language-pack-zh-base
中文化 Firefox、Openoffice
apt-get install \
mozilla-firefox-locale-zh-cn \
mozilla-firefox-locale-zh-tw \
openoffice.org2-l10n-zh-cn \
openoffice.org2-l10n-zh-tw \
openoffice.org2-help-zh-cn \
openoffice.org2-help-zh-tw \
language-support-zh以上兩個動作可由 GNOME 桌面操作: 系統 (System) → 管理 (Administration) → Language Selector → Chinese → Translations (打勾)、Writing Aids (打勾)
6. 完成以上所有步驟後登出 (Log out) X window 再重新登入即可
後記:
- 安裝 Ubuntu 5.10 時, 以中文為預設語系的安裝過程會發生錯誤, 英文就不會 :( 硬體環境: Asus S5N notebook )
- 在 LANG=en_US 的 GNOME 桌面裡, 安裝完 gcin 中文輸入法後就能直接使用; 在中文 GNOME 桌面裝完 gcin 後, 輸入法按不出來, 必須 apt-get install im-switch (/etc/apt/sources.list 的修改備忘在這篇) 並重新登入 X window 才能正常使用 gcin 中文輸入法
- 經以上步驟裝好 firefly 字型後, 在預設語言為英文的 GNOME 環境裡, 以 Firefox 瀏覽 BIG5 語系的網頁時, 中文字很清晰, 但 UTF-8 語系的中文網頁, 中文字卻很模糊; 在預設語言為中文 (zh_TW 或 zh_TW.UTF-8 都無所謂) 的環境就沒有這種問題
- 如果 Firefox 瀏覽網頁時發現中文字變模糊, 但以上的設定都正確: 直接把 Firefox 關掉, 再重新啟動 Firefox 即可
- 讓桌面顯示「我的電腦」、「資源回收桶」的方法:
1. vi ~/.gconf/apps/nautilus/desktop/%gconf.xml → :%s/false/true/g
2. 應用程式 (Applications) → 系統工具 (System Tools) → 組態編輯器 (Configuration Editor) → apps → nautilus → desktop
參考資料:
相關網頁:
Posted by Jamyy at 2005年11月17日 11:25
Trackback Pings
TrackBack URL for this entry:
http://cha.homeip.net/cgi-bin/mt/mt-tb.cgi/142
Listed below are links to weblogs that reference 讓 Ubuntu GNOME 桌面顯示清晰中文字:
» Shuffle the Shuffle from On A Night Like This
之前個Ubuntu Linux壞了。事後才發現,原來5.10版本,如果在安裝時選定了中文語系,會壞機。要在安裝時選英文,再在事後設做中文。昨天到今天都在改個fontconf,現在中文出得幾靚。但好似... [Read More]
Tracked on 2006年02月09日 12:02