http://people.debian.org.tw/~moto/topic ... ide-8.html
有沒有簡單一點的方法?
安裝中文字型
Taipei 字型
# apt-get install xfonts-intl-chinese
TTF 字型
安裝相關軟體 # apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp
修改 XF86Config
載入 『 xtt 』模組
把 /etc/XF86Config-4 的 module section 裡面的 Load "freetype" 改成 Load "xtt"。
Section "Module"
Load "xtt" # 加入 xtt 模組
Load "ddc"
Load "GLcore"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
Load "bitmap"
Load "speedo"
Load "type1"
Load "vbe"
Load "int10"
EndSection
手動新增 TrueType 字型,以『 MS Windows 新細明體 』做說明
Debian 管理 TTF 與 CID 字型的大總管: Defoma
安裝相關軟體包
x-ttcidfont-conf
libft-perl
取得字型
講句坦白話,我真的覺得微軟新細明體的中文字好漂亮,嘿嘿!現在我們就把他安裝進我們的 Debian 裡頭,第一步請找台有合法 Windows 的電腦把裡頭有個名叫 『 mingliu.ttc 』的檔案拷貝出來。
為了方便管理,我們將他放到:
/usr/share/fonts/truetype/dynalab/
理論上你可以擺在任何一個地方,上面的路徑只是個人習慣。
產生字型 hints 檔
defoma-hints truetype mingliu.ttc > ttf-dynalab-mingliu.hints
它會產生基本的 hints ,我只在他產生的 .hints 加上一行
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
如果不加這一行,細明體的英文會變成和中文一樣寬,很難看。 其他字型好像不加也沒關係!!不知道為什麼。
示範檔:
category truetype
begin /usr/share/fonts/truetype/dynalab/mingliu.ttc
FaceNum = 2
Family = MingLiU
FontName = MingLiU-Regular
Encoding = Unicode
Location = Chinese-Taiwan English
Charset = ISO10646-1 BIG5 ISO8859-1
UniCharset = BIG5 ISO8859-1
GeneralFamily = Ming
Weight = Medium
Width = Fixed
Shape = Upright
Alias = MingLiU
Foundry = Dynalab
Priority = 20
X-Family = MingLiU
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
Family1 = PMingLiU
FontName1 = PMingLiU-Regular
Encoding1 = Unicode
Location1 = Chinese-Taiwan English
Charset1 = ISO10646-1 BIG5 ISO8859-1
UniCharset1 = BIG5 ISO8859-1
GeneralFamily1 = Ming
Weight1 = Medium
Width1 = Fixed
Shape1 = Upright
Alias1 = PMingLiU
Foundry1 = Dynalab
Priority1 = 20
X-Family1 = PMingLiU
TTCap1 = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
end
註冊字型
下達底下的命令,把 mingliu 的 hints 註冊到 defoma:
defoma-font reregister-all /etc/defoma/hints/ttf-dynalab-mingliu.hints
修改 /etc/X11/XF86Config-4 字型路徑
把 "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" 路徑加入 /etc/X11/XF86Config-4,底下為 /etc/X11/XF86Config-4:
Section "Files"
# FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection