【问题标题】:Can't get Ghostscript to use OpenType fonts无法让 Ghostscript 使用 OpenType 字体
【发布时间】:2019-12-07 14:19:07
【问题描述】:

我正在尝试在 Windows 上使用 GhostScript 9.27 将一些 PDF 文件转换为 PDF/A 文件。但是,安装的字体会被 Helvetica 替换,即使它应该在系统的字体目录中可用。

这是调试输出的相关部分:

%Resolving: [7 0]
resmp ResourceStatus beg /RotisSansSerifStd-Regular
cidcm GetCIDSystemInfo beg
resmp ResourceStatus beg /RotisSansSerifStd
resmp ResourceFileName beg RotisSansSerifStd
resmp ResourceFileName : have NO map record.
resmp ResourceFileName : retrieving %rom%Resource/CIDFont/RotisSansSerifStd
resmp ResourceFileName end
resmp ResourceStatus end
cidcm GetCIDSystemInfo end
resmp ResourceStatus end

据我所知,Ghostscript 应该可以使用 otf 字体,我想知道为什么当我添加到 Fontmap.GS 时会发现“没有地图记录”:

/RotisSansSerifStd          (C:\Windows\Fonts\RotisSansSerifStd-Regular.otf)    ;
/RotisSansSerifStd,Bold         (C:\Windows\Fonts\RotisSansSerifStd-Bold.otf)   ;
/RotisSansSerifStd-Regular      (C:\Windows\Fonts\RotisSansSerifStd-Regular.otf)    ;
/RotisSansSerifStd-Bold         (C:\Windows\Fonts\RotisSansSerifStd-Bold.otf)   ;

我做错了什么?

【问题讨论】:

    标签: windows pdf ghostscript opentype


    【解决方案1】:

    首先,您不能(目前)使用带有 CFF 轮廓的 OTF 字体来代替缺少的 CIDFont,您可以使用带有 TrueType 轮廓的 OTF 字体。我相信您可以使用带有 CFF 轮廓的 OTF 字体来代替缺少的字体。

    您的 PDF 文件似乎缺少 CIDFont(这将有助于查看 GS 的所有输出但没有设置 RESMPDEBUG),您正在修改 fontmap.GS,它只定义了丢失字体的替代品,而不是 CIDFont。您需要修改 cidfmap 而不是 fontmap.GS 才能为缺少的 CIDFont 定义替代品。

    据我所知,“没有地图记录”警告是完全正确的,在 cidfmap 中没有命名 CIDFont 的地图记录。

    【讨论】:

      猜你喜欢
      • 2011-01-04
      • 2019-09-11
      • 2013-10-23
      • 2017-02-19
      • 2011-02-09
      • 2012-09-08
      • 2020-05-01
      • 2015-02-07
      • 2010-11-15
      相关资源
      最近更新 更多