先在 /etc/make.conf 中新增如下的設定:
XFREE86_VERSION= 4
XFree86-4 的安裝:
# cd /usr/ports/x11/XFree86-4
# make install
讓 XFree86-4 使用 TrueType 字型:設定 XF86Config,XFree86-4 的設定檔改放在 ,/etc/X11 底下。
先用 XFree86 -configure 產生 XF86Config.new,然後用 XFree86 -xf86config XF86Config.new 來測試這個檔案能不能正常的運作,如果可以的話,就 mv XF86Config.new /etc/X11/XF86config, 然後依照以下的方式繼續做下去。
在 Section "Module" 區段,找到 Load "freetype" 換成 Load "xtt",如果沒有則自行加入。 通常用 Load "xtt" 就可以很正常的讀中文 TrueType 字型了。筆者也是用這個設定。如果對 Load "freetype" 有興趣,可以參考下一段描述。
在 Section "Monitor" 區段, 加入 HorizSync 31.5 - 57.0 與 VertRefresh 50.0 - 100.0
在 Section "Screen" 區段, 加入 DefaultDepth 16,並在 SubSection "Display" 中, Depth 16 的地方加上 Modes "1024x768"
以下是 module freetype 的範例, Load "freetype" 要設 /usr/X11R6/lib/X11/fonts/TrueType/encoding.dir 吧! 我的 encodings.dir 內容是這一樣:
2
big5-0 /usr/X11R6/lib/X11/fonts/encodings/large/big5.eten-0.enc.gz
gb2312.1980-0 /usr/X11R6/lib/X11/fonts/encodings/large/gb2312.1980-0.enc.gz
這些檔案內容是 big5 <=> unicode 以及 gb <=> unicode table。 因為文鼎以及後來的 window 字型都是用 unicode 作內碼, 當我們要以 big5 的內碼來使用自型時,就要告知其 mapping。