步骤:
1.下载源码
2.解压到test
3.将中文字体添加到test/Resource/Font下面
4.编辑test/Resource/Init下面的cidfmap文件
/STSong-Light <</FileType /TrueType /Path (/home/package/ghostscript-9.56.1/Resource/Font/simsun.ttc) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STFangsong-Light <</FileType /TrueType /Path (/home/package/ghostscript-9.56.1/Resource/Font/simfang.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STHeiti-Regular <</FileType /TrueType /Path (/home/package/ghostscript-9.56.1/Resource/Font/simhei.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
/STKaiti-Regular <</FileType /TrueType /Path (/home/package/ghostscript-9.56.1/Resource/Font/simkai.ttf) /SubfontId 0 /CSI [(GB1) 4] >> ;
其中“/home/package/ghostscript-9.56.1/Resource/Font/”是绝对路径
5.在test下./configure --prefix--/opt/ghostscript
6.make
7.make install
8.编辑环境变量~/.bashrc 或 /etc/profile
export GSHOME=/opt/ghostscript
export PATH=${GSHOME}/bin:$PATH