频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

Slackware 9 Ghostscript中文解决方案

来源: 作者: 出处:巧巧读书 2006-08-06 进入讨论组

  (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");文字:http://www.qqread.com/linux/2006/08/f220195061.html 更多文章 更多内容请看数字化校园网解决方案大型实用解决方案专题应用解决方案专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章