【发布时间】:2016-02-08 06:06:46
【问题描述】:
我正在尝试将 pdf 文件转换为图像。
命令:gs -sDEVICE=pngalpha -sOutputFile=cover.png -r144 myfile.pdf
输出:
Can't find CID font "MyStrangeNonEmbeddedFont".
Attempting to substitute CID font /Adobe-Identity for /MyStrangeNonEmbeddedFont, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. attempting to use fallback CIDFont.See doc/Use.htm#CIDFontSubstitution.
Loading a TT font from /some/path/DroidSansFallback.ttf to emulate a CID font Adobe-Identity ... Done.
字体已成功替换为 DroidSansFallback.ttf,但所有字符均不正确。例子:
'C' is substituted with '<'
'6' is substituted with '>'
'B' is substituted with '@'
'D' is substituted with 'B'
有办法解决吗?
【问题讨论】:
-
盲目替换通常是个坏主意。只需按照ghostscript advice 并将正确的候选人放在正确的目录中,然后再试一次。
-
@Mike'Pomax'Kamermans - 我做到了,使用了几种不同的字体(CID 和备用 TFF)。字符仍然是错误的,但有趣的是仍然是相同的方式 - “B”是“D”等等。
-
如果“替换字体”的字符 ID 映射(CID 字体的 CID 部分)与原始字体使用的 CID 映射不匹配,则会发生这种情况。如果情况很少,您可以尝试编辑目标字体并手动更改其 CID 映射(老实说,这有点麻烦),或者您可以尝试获取副本使用的原始字体
标签: linux pdf fonts ghostscript truetype