如何从 Ghostscript 更新 CID 字体
How update CID font from Ghostscript
我正在尝试使用
转换一些 PDF 文件
gs -SDEVICE=tiffg4 -r600x600 -sPAPERSIZE=letter -sOutputFile=_LOTE_51168_01.tiff -dNOPAUSE -dBATCH *.pdf
简单的例子,但是当执行该行时,出现下一个错误
Can't find CID font "MS-Gothic".
Substituting CID font /Adobe-Japan1 for /MS-Gothic, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Japan1" is not provided either. Will exit with error.
Error: /undefined in findresource
Operand stack:
--dict:8/17(L)-- F1 10.5 --dict:5/5(L)-- --dict:5/5(L)-- MS-Gothic --dict:11/12(ro)(G)-- --nostringval-- CIDFontObject --dict:9/9(L)-- --dict:9/9(L)-- Adobe-Japan1
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:26/40(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
在网上查找,发现我必须更新 de CID 字体,但不知道如何,我阅读了页面 http://ghostscript.com/doc/current/Use.htm#CIDFonts 但是有点复杂,有人知道或有人做过这样的事情,或者从一些教程中知道如何做到这一点,如果能帮助我,我将不胜感激。谢谢
使用更新版本的 Ghostscript,当前版本 (9.18) 附带后备 CIDFont,可能 有效。否则,您需要将 CIDFont 添加到 Ghostscript 知道的字体列表中。它需要是真正的 CIDFont 或 TrueType 字体,可以(在限制范围内)用作缺少的 CIDFont 的替代品。
不可能给出 step-by-step 指令,因为各种 Linux 发行版对 Ghostscript 的打包方式不同,而且您使用的版本很旧(现在至少有 6 年了)。我不记得这么旧的版本需要做什么,网站上的说明可能与这么旧的版本不兼容,它们与当前版本有关。
您想要文档中标题为 "CID Font substitution" 的部分(因为您正在定义缺失字体的替代品),然后是 'Explicit DICFont substitution',几乎肯定是 'format 2'
在 TeX Live 2015 中进行 CJK 集成实验之后,可以在
找到有关使用 Ghostscript 使用 CID 字体的教程
https://www.preining.info/blog/2015/04/setting-up-cid-fonts-for-ghostscript-technical-notes/
注意:Ghostscript 必须使用
编译
./configure --disable-compile-inits
否则,必须放置各种字体、符号链接和配置文件的目录将构建在 gs 二进制文件中,因此无法访问。 (也许这是 Linux 上的默认值,我来自 Mac,无法分辨。)
可在
找到用于创建所有必需文件的脚本
https://www.preining.info/blog/software-projects/cjk-fonts-ghostscript/
希望对您有所帮助!
我正在尝试使用
转换一些 PDF 文件gs -SDEVICE=tiffg4 -r600x600 -sPAPERSIZE=letter -sOutputFile=_LOTE_51168_01.tiff -dNOPAUSE -dBATCH *.pdf
简单的例子,但是当执行该行时,出现下一个错误
Can't find CID font "MS-Gothic".
Substituting CID font /Adobe-Japan1 for /MS-Gothic, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Japan1" is not provided either. Will exit with error.
Error: /undefined in findresource
Operand stack:
--dict:8/17(L)-- F1 10.5 --dict:5/5(L)-- --dict:5/5(L)-- MS-Gothic --dict:11/12(ro)(G)-- --nostringval-- CIDFontObject --dict:9/9(L)-- --dict:9/9(L)-- Adobe-Japan1
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:26/40(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
在网上查找,发现我必须更新 de CID 字体,但不知道如何,我阅读了页面 http://ghostscript.com/doc/current/Use.htm#CIDFonts 但是有点复杂,有人知道或有人做过这样的事情,或者从一些教程中知道如何做到这一点,如果能帮助我,我将不胜感激。谢谢
使用更新版本的 Ghostscript,当前版本 (9.18) 附带后备 CIDFont,可能 有效。否则,您需要将 CIDFont 添加到 Ghostscript 知道的字体列表中。它需要是真正的 CIDFont 或 TrueType 字体,可以(在限制范围内)用作缺少的 CIDFont 的替代品。
不可能给出 step-by-step 指令,因为各种 Linux 发行版对 Ghostscript 的打包方式不同,而且您使用的版本很旧(现在至少有 6 年了)。我不记得这么旧的版本需要做什么,网站上的说明可能与这么旧的版本不兼容,它们与当前版本有关。
您想要文档中标题为 "CID Font substitution" 的部分(因为您正在定义缺失字体的替代品),然后是 'Explicit DICFont substitution',几乎肯定是 'format 2'
在 TeX Live 2015 中进行 CJK 集成实验之后,可以在
找到有关使用 Ghostscript 使用 CID 字体的教程https://www.preining.info/blog/2015/04/setting-up-cid-fonts-for-ghostscript-technical-notes/
注意:Ghostscript 必须使用
编译./configure --disable-compile-inits
否则,必须放置各种字体、符号链接和配置文件的目录将构建在 gs 二进制文件中,因此无法访问。 (也许这是 Linux 上的默认值,我来自 Mac,无法分辨。)
可在
找到用于创建所有必需文件的脚本https://www.preining.info/blog/software-projects/cjk-fonts-ghostscript/
希望对您有所帮助!