Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->Linux技术 ->发行版专区 ->slackware ->Slackware 9 ghostscript/gv 中文解决方案
  相关分类: 
CentOS
ubuntu
turbolinux
Suse
slackware
Redhat
Mepis
mandriva
Mandrake
knoppix
Gentoo
Fedora
Debian
红旗
  站内搜索: 
热门文章排行
热门文章排行 Fedora Core 5.0 用Xen虚拟Slackware(04-11)
Slackware 9 ghostscript/gv 中文解(05-05)
轻轻松松的安装Slackware Linux -- 4(05-05)
Slackware 11.0使用手记 (04-22)
轻轻松松的安装Slackware Linux -- 5(05-05)
精采文章排行
精采文章排行 轻轻松松的安装Slackware Linux -- 5(05-05)
轻轻松松的安装Slackware Linux -- 4(05-05)
轻轻松松的安装Slackware Linux -- 0(05-05)
轻轻松松的安装Slackware Linux -- 2(05-05)
轻轻松松的安装Slackware Linux -- 1(05-05)
  ·轻轻松松的安装Slackware Linux -- 4.如·轻轻松松的安装Slackware Linux -- 0.自·轻轻松松的安装Slackware Linux -- 2.作·轻轻松松的安装Slackware Linux -- 1.如·Slackware 9 ghostscript/gv 中文解决方· Slackware Linux实战手记之安装篇· 认识 Slackware Linux 及制作系统安装磁· 认识 Slackware Linux 及制作系统安装磁· 系统安装初步之Slackware Linux 的硬碟

Slackware 9 ghostscript/gv 中文解决方案

作者:Webmaster   来源:Linux-cn.com   点击:   日期:2007-05-05 [收藏] [投稿]

  IE是否经常中毒?推荐您

(1) Software requirements:

Install ghostscript (espgs-7.05.6), font (gnu-gs-fonts) and ghostview (gv) packages

(2) Font requirements:

Install SimSun, SimHei and other Chinese TTF fonts to XFree86 TTF font dir

(3) Hack the ghostscript:

Backup file /usr/share/ghostscript/7.05/lib/CIDFnmap, then modify it as follows:


    %(CIDFnmap.Win) .runlibfile
    % Add the following line
    (CIDFnmap.zhcn) .runlibfile

Add file /usr/share/ghostscript/7.05/lib/CIDFnmap.zhcn as follows:


/SimSun     (/usr/X11R6/lib/X11/fonts/TTF/simsun.ttc)           ;
/STSong-Light           /SimSun             ;
/Beijing                /SimSun             ;
%/NSimSun   (/usr/X11R6/lib/X11/fonts/TTF/simsun.ttc)   2       ;
/Adobe-GB1              /SimSun             ;

/SimHei     (/usr/X11R6/lib/X11/fonts/TTF/simhei.ttf)       ;
/STHeiti-Regular        /SimHei         ;

/SimFang    (/usr/X11R6/lib/X11/fonts/TTF/simfang.ttf)      ;
/FangSong               /SimFang            ;
/STFangsong-Light       /SimFang            ;
/SimKai     (/usr/X11R6/lib/X11/fonts/TTF/simkai.ttf)       ;
/KaiTi                  /SimKai             ;
/STKaiti-Regular        /SimKai             ;

/FZFangSong (/usr/X11R6/lib/X11/fonts/TTF/fzfsjw.ttf)       ;
/FZWeiBei   (/usr/X11R6/lib/X11/fonts/TTF/fzwbjw.ttf)       ;
/FZKai      (/usr/X11R6/lib/X11/fonts/TTF/fzktjw.ttf)       ;
/FZShuTi    (/usr/X11R6/lib/X11/fonts/TTF/fzstjw.ttf)       ;

/SIL-FangSong-          /STFangsong-Light   ;
/SIL-FangSong-Reg-Jian  /STFangsong-Light   ;
/SIL-Hei-Med-Jian       /STHeiti-Regular    ;
/SIL-Kai-               /STKaiti-Regular    ;
/SIL-Kai-Reg-Jian       /STKaiti-Regular    ;
/SIL-Song-Reg-Jian      /STSong-Light       ;

Backup /usr/share/ghostscript/7.05/lib/gs_res.ps, then modify it as follows:


    Find the following line
       /GenericResourceDir (/usr/share/ghostscript/) readonly .forcedef
    Replace it with the following line
       /GenericResourceDir (/usr/share/ghostscript/resource/) readonly .forcedef

(4) Add Adobe CMAP for CID fonts to ghostscript


    Download ac14.tar.Z and ag14.tar.Z from the following link:
    ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/
    Execute the following commands:
    # cd /usr/share/ghostscript/
    # mkdir resource
    # cd resource
    # mkdir CMap
    # tar -zxvf /tmp/ac14.tar.Z
    # tar -zxvf /tmp/ag14.tar.Z


    # cp ac14/CMap/* ag14/CMap/* CMap
    # rm -rf ac14 ag14

Alternatively, if you want the latest Adobe CMAP files, download "Complete set of Adobe CMAP files for CID Fonts" in the "Adobe Font Development Kit for OpenType" from adobe.com:


    http://partners.adobe.com/asn/tech/type/otfdk/index.jsp

    Execute the following commands:
    # cd /usr/share/ghostscript/
    # mkdir resource
    # cd resource
    # mkdir CMap
    # unzip /tmp/Adobe Cmaps.zip
    # cp Adobe Cmaps/Adobe-CNS1-2/* Adobe Cmaps/Adobe-CNS1-3/* 
      Adobe Cmaps/Adobe-CNS1-4/* Adobe Cmaps/Adobe-GB1-3/* 
      Adobe Cmaps/Adobe-GB1-4/* Adobe Cmaps/Adobe-Identity-0/* 
      CMap
    # rm -rf Adobe Cmaps

(5) Hack Mozilla/Firebird preference file:


    Modify mozilla/default/pref/unix.js as follows:

    Look for the following line:
        pref("print.postscript.nativefont.zh-CN", "");

    Replace it with the following line:
        pref("print.postscript.nativecode.zh-CN", "gb2312");
        pref("print.postscript.nativefont.zh-CN", "SimSun-GB-EUC-H");



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇: Slackware Linux实战手记之安装篇   下一篇:轻轻松松的安装Slackware Linux -- 1.如何选购Linux可以搭配的机器
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

   相关文章:
·轻轻松松的安装Slackware Linux -- 5.其

   文章评论:(1条)
  
 请留名: 匿名评论   点击查看所有评论 论坛讨论
 

 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。