Slackware9Ghostscript Chinese solution

Source: Internet
Author: User
Article title: Slackware9Ghostscript Chinese solution. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
(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 );
/Fzweibo ei (/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 ");
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.