Slackware9Ghostscript中文解决方案
(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/
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/
顶(0)
踩(0)
- 最新评论