以下是使用步聚:
建立字體存放目錄,如:
$ mkdir /usr/X11R6/lib/X11/fonts/TrueType
使用 Windows 所帶的字體:
$ cd "where_is_your_windows"/fonts/
$ cp simsun.ttf /usr/X11R6/lib/X11/fonts/TrueType -- 拷貝簡宋體
生成 fonts.dir 文件
$ cd /usr/X11R6/lib/X11/fonts/TrueType
$ ttmkfdir > fonts.dir
注:mkfontdir 用于生成點(diǎn)陣字體的 fonts.dir 文件,ttmkfdir 用于生成 TrueType 字體的 fonts.dir 文件。
由于 ttmkfdir 不能識(shí)某些漢字TTF的編碼,需手工修改。
生成的 fonts.dir 如下:
fonts.dir
======
1
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-ascii-0
改為:
simsun.ttf -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
生成 fonts.alias 文件
$ cat fonts.dir > fonts.alias
將 fonts.alias 內(nèi)容改為:
SimSun -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0
將字體路徑加入配置:
如果你的字體搜索路徑是 FontPath "unix/:-1" 的話,說明你是使用 xfs 作為字體搜索代理的,這是 RedHat 的默認(rèn)配置。此配置適用于網(wǎng)絡(luò)用戶,對(duì)于PC用戶并無意義。建議在 XFree86 的配置文件中直接指定常用字體搜索路徑。以下對(duì)這兩種方法的設(shè)置做個(gè)簡要的說明:
1. 使用 xfs (RedHat 的默認(rèn)配置)
勿需修改 /etc/X11/XF86Config 文件。
$ su
# chkfontpath -add /usr/X11R6/lib/X11/fonts/TrueType
如無問題的話,可使用 chkfontpath --list 顯示所有的搜索路徑。
2. 不使用 xfs (推薦)
打開 /etc/X11/XF86Config 文件,將原 FontPath 取消:
# FontPath "unix/:-1"
加入所有的字體路徑:
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
取消 xfs 的后臺(tái)執(zhí)行:
# setup
在 System services 中取消 xfs。
啟動(dòng) X,查看中文TTF字體:
$ xfd -fn simsun & -- 顯示字體內(nèi)容
在 Netscape 中使用 TTF 字體。
啟動(dòng) netscape,打開屬性設(shè)置 Edit->Preferences... 在 Appearance(外觀)中選擇 Fonts(字體)。
For the Encoding: 選擇 Simplified Chinese (gb 2312-80)
Variable Width Font(變寬字體): 選擇 Simsum (Misc)
Allow Scaling (允許縮放)選中
再次啟動(dòng) Netscape 使改動(dòng)生效。
標(biāo)簽:錫林郭勒盟 宿州 萍鄉(xiāng) 云南 天水 無錫 克拉瑪依 合肥
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《RedHat 6.2 中文字體TrueType的使用》,本文關(guān)鍵詞 RedHat,6.2,中文字體,TrueType,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。