gs-cjk 是一個讓 Aladdin/Artifex/GNU ghostscript(gs) 能夠使用 CJK 功能的發展計畫。在這個網站中,所提供的程式集, 包含讓 gs 能夠把 CJK ( 繁、簡中文,日文,韓文 ) 的 TrueType 字型當作 CID-Keyed 的字型來處理的必要修補檔案( patch), 以及改進在 gs CID-Keyed 字型的handler。該計畫已經整合到 ghostscript7。
CID-Keyed font 由 CID font 和 CMap 所組成, 使用前記得安裝 print/adobe-cmap 。
使用 ghostscript 來列印文件:
# gs -sDEVICE=cdj550 -sOutputFile=/dev/lpt0 xx.ps
gs --help 會有更多的選項
以此套件搭配 arphicttf 就可以讓大部分的軟體可以透過 gs 讀取 ttf 來產生正確的 gs 檔。
以下是利用 ttfm 來將 arphicttf 的字型加入 gs-cjk 的列表:
# ttfm.sh --add gs-cjk bkai00mp.ttf # ttfm.sh --add gs-cjk bsmi00lp.ttf
這樣會分別產生常用的 CID-Keyed:ShanHeiSun-Light-Eten-B5-H 以及 ZenKai-Medium-Eten-B5-H 以供需要列印的軟體使用,例如 Mozilla、KDE等。
Note: 在 ghostscript 8 之後就不需要透過 ttfm.sh 來安裝, 找出 cidfmap 後,加入以下的設定:
/Adobe-CNS1 << /FileType /TrueType /Path (/usr/local/share/fonts/TrueType/bsmi00lp.ttf) /SubfontID 0 /CSI [(CNS1) 2] >> ; /Adobe-GB1 << /FileType /TrueType /Path (/usr/local/share/fonts/TrueType/gbsn00lp.ttf) /SubfontID 0 /CSI [(GB1) 2] >> ; /Adobe-Japan1 << /FileType /TrueType /Path (/mnt/local/share/fonts/TrueType/kochi-mincho.ttf) /SubfontID 0 /CSI [(Japan1) 3] >> ; /Adobe-Korea1 << /FileType /TrueType /Path (/usr/local/share/fonts/TrueType/batang.ttf) /SubfontID 0 /CSI [(Korea1) 3] >> ;
WWW: Ghostscript, Ghostview and GSview
WWW: gs-cjk project