[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

(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.
--
※ Origin: 生命科学 BBS <bbs.life.nthu.edu.tw> 
◆ From: waru.life.nthu.edu.tw

--
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 -----


-- 
[ This mail was originally sent to  debian-chinese@lists.debian.org ]
[ and was forwarded to this list automatically. Big5 characters are ]
[ also converted to GB at the same time, Please note that there may ]
[ be errors during the conversion as this is not done by a human!   ]


Reply to: