(fwd) [轉錄]如何在 Netscape 中不用 bg5ps 列印中¤嬁
謝謝柏鋒兄在 cle-devel 貼的文章,教了大家如何利用 CID Postscript 字型,
例如 Adobe 利用台灣教育部 (MOE) 製出來那一套,直接在 GNU/Linux 下的 Netscape
列印中文,不用 bg5ps 等工具了。
小弟依照以下的說明,真的可以在 Debian GNU/Linux 下在 Netscape 直接印
中文網頁,非常高興!字型列印品質也相當不錯,也完全沒有中文字重疊的情形。
目前有個小問題,就是有些比較長(多中文字)的中文網頁,GhostScript-5.50
有時會有錯誤訊息,例如我試印 http://www.debian.org/intro/why_debian.zh-tw.html,;
第一頁列印成功,第二頁就出錯了。不知大家有沒有遇上這樣的問題?我猜 beta 版的
Ghostscript-5.96 (?) 可能沒有這樣的問題。
最後一個問題:各位 CLE 和 中文Debian 的大大,認為這是在 GNU/Linux 下
列印中文的最佳絕招嗎?應否納文 GNU/Linux 中文化的標準? e.g. 包裝 .deb
和 .rpm 等。 ^_^ 謝謝!
東東
----- Forwarded message from informer@mylinux.cgu.edu.tw -----
From: informer@mylinux.cgu.edu.tw
Date: Sun, 19 Dec 1999 01:56:28 +0800
To: cle-devel@linux.org.tw
Subject: [cle-devel] (fwd) [轉錄]如何在 Netscape 中不用 bg5ps 列印中文
Content-Type: text
Path: tlug.sinica.edu.tw!news2.sinica!freebsd.sinica.edu.tw!freebsd.ntu.edu.tw!fromzero
From: JoeLu@freebsd.ee.ntu.edu.tw (圓顱方趾)
Newsgroups: freebsd.taiwan.chinese
Subject: [轉錄]如何在 Netscape 中不用 bg5ps 列印中文
Date: 18 Dec 1999 14:26:48 GMT
Organization: 從零開始
Message-ID: <3Y5X3P$R9E@freebsd.ee.ntu.edu.tw>
X-Filename: Chinese/M.945527209.A
Lines: 89
Xref: tlug.sinica.edu.tw freebsd.taiwan.chinese:333
※ [本文轉錄自 386BSD 看板]
發信人: bearscorp.bbs@bbs.life.nthu.edu.tw (無責任學長), 看板: 386BSD
標 題: 如何在 Netscape 中不用 bg5ps 列印中文
發信站: 清華生命科學 BBS (Sat Dec 18 09:15:24 1999)
轉信站: fromzero!freebsd.ntu!news.cs.nthu!news.nthu!nthuls
經過幾天的摸索, 終於找到在 Netscape 中直接印出
中文的方法了.
要讓 Ghostscript 使用中文 postscript 字型其實
很早就可以做, 主要是用 type 0 composite font.
因為 type 1 的 font 只能有 256 個字元, 因此對
於中文日文等, 就一定要用 type 0 composite font,
把許多 type 1 的字型拼起來, 許多 tex 系統就是
這樣做的. 日本人很早就有人推出 free 的 PS fonts,
就是用 type 0 font.
中文原本也可以做, 不過可能是因為太麻煩了, 一直
沒有一個方便的套件推出. 我一直想要直接由 Netscape
列印中文, bg5ps 一類的套件雖然可以用, 可是多一套
手續就是不方便.
原本我想用 truetype fonts, 因為 ghostscript 似乎
是支援 double byte ttf 的. 可惜 gs 的 ttf 支援不
夠完善, 不認得 Windows Big5 及 Windows Unicode
編碼的中文字型(這部份可能還要再 check).
經過幾天後, 終於在 CJKV 中找到在 gs 中使用 CID-keyed
font 的方法了.
要使用 CID-keyed font 要有幾個東西.
1. CID font, 可以從
ftp://www.orilly.com/pub/examples/nutshell/cjkv/adobe/samples
拿到. 中文的字型有兩個, MOEKai-Regular 及 MOESung-Regular
2. CMap, 可以拿
ftp://www.orilly.com/pub/examples/nutshell/cjkv/adobe/ac10.tar.Z
這個 file. 解開後裡面的 CMap 目錄下有各種
encoding 的 CMap. Big5 可以用 ETen-B5-H (橫書)
及 ETen-B5-V (直書)
3. CID-keyed font file.
http://waru.life.nthu.edu.tw/~frankch/postscript/
裡面有 MOEKai-Regular-ETen-B5-H.gsf 及
MOESung-Regular-ETen-B5-H.gsf 兩個 file.
把這些東西都放在 /usr/local/share/ghostscript/fonts
修改 /usr/local/share/ghostscript/5.50/Fontmap file
加入
/MOEKai-Regular-ETen-B5-H (MOEKai-Regular-ETen-B5-H.gsf) ;
/MOESung-Regular-ETen-B5-H (MOESung-Regular-ETen-B5-H.gsf) ;
這兩行.
在 Netscape 的 resource file
加入下列
*documentFonts.big5*psname: MOESung-Regular-ETen-B5-H
*documentFonts.big5*pscode: big5
*documentFonts.big5*pswidth: 1000
*documentFonts.big5*psascent: 880
或 (in .Xresources/.Xdefaults)
Netscape*documentFonts.big5*psname: MOESung-Regular-ETen-B5-H
Netscape*documentFonts.big5*pscode: big5
Netscape*documentFonts.big5*pswidth: 1000
Netscape*documentFonts.big5*psascent: 880
這樣 Netscape 就可以直接印出中文字了.
NOTE: 以上的 procedure 可以用在日文, GB, 以及其他文字.
只要抓回對應的 CID font 及 CMaps 就可以了.
另外, 如果要印其他編碼的中文, 如 UNICODE, EUC,
CNS 等, 只要有 CMap file (in ac10.tar.Z), 仿
照 MOEKai-Regular-ETen-B5-H.gsf 的內容寫幾個
gsf file 就可以了. 還有, gsf 的 filename 不一
定要這樣寫, 可以用短一點的.
NOTE2: postscript 印表機因為不經過 ghostscript, 因
此要加上一些 trick 才可以印中文.
REF: CJKV, GhostScript docs.
--
[1;32m※ Origin: [33m生命科學 BBS [37m<bbs.life.nthu.edu.tw> [m
[1;31m◆ From: [36mwaru.life.nthu.edu.tw[m
--
Pofeng "informer" Lee, 李柏鋒, mailto:pofeng@linux.org.NOSPAM.tw
TEL: 03-3286030 ext 6582 (20:00-23:00) Room: 394 Pager: 3835
Chang Gung Memorial Hospital
----- End forwarded message -----
Reply to: