使用Ghostscript的PostScript中的TTF不显示Adobe lIststrator

时间:2015-05-28 14:56:29

标签: ghostscript true-type-fonts postscript adobe-illustrator

所以,我有一个PostScript,我使用自定义字体转换成PDF,即原本不包含在计算机/ Ghostscript库中的字体。

在PDF中正确呈现字体(通过飞行前印前分析显示其内容),并且在Photoshop中查看PDF时它看起来也很好。

然而,问题是当我将它带入Illustrator时,字体字形无法识别并显示为 .notdef 字符(带有十字形的矩形)。

在Illustrator中,当我在字体下拉列表中查看时,我安装了字体。但这仍然没有帮助。

是否有其他人遇到此问题或者甚至可以复制它?

我已经使用了两个(以下)处理过来将字体包含到我的ghostscript环境中进行故障排除,但两者都产生了错误的结果。

  1. 将TTF转换为Type42
  2. 将TTF添加到Ghostscript FontMap
  3. 附件是包含PDF和我使用过的TTF字体的ZIP文件(我也使用过其他人也有相同的结果)。如果您需要更多文件,请告诉我,我会更新。

    Zip file

    下面是PostScript文件(非常简单)和我的执行。

    %!ps-nonconforming
    /inch {72 mul} bind def
    /Pacifico 20 selectfont
    1 inch 10 inch moveto
    /fontheight currentfont dup /FontBBox get dup 3 get % top
     exch 1 get sub % top - bottom
     exch /FontMatrix get 3 get mul def % adjusted by height multiplier
    /lineheight fontheight 1 mul def % add 20% for line spacing
    /newline {0 lineheight neg rmoveto} bind def % negate height to move downwards
    gsave (lineheight: ) show lineheight 20 string cvs show grestore
    newline gsave (Museo) show grestore
    

    命令:

    gs -o fonttest.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 \
       -dPDFSETTINGS=/prepress fonttest.ps
    
    PS:我知道这可能是一个Illustrator错误,我已经开了一张支持票,但这也可能是我嵌入字体的方式,或者有人可能只有答案: d

1 个答案:

答案 0 :(得分:3)

我发现这个帖子UTF-8 PDF generated with TCPDF showing up fine in Adobe Acrobat but corrupted in Illustrator and Google preview谈到了Illustrator中的损坏。

使用这个我认为它可能是子集导致ghostscript中的问题。

找到此线程How to make GhostScript PS2PDF stop subsetting fonts并应用Ghostscript选项来停止字体子集化。

所以在我对Ghostscript的命令中,我使用了

-dSubsetFonts=false

这很有效!在Illustrator中,字体按预期显示。

所以我的完整gs命令是:

gs -o output.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 \
   -dSubsetFonts=false -dPDFSETTINGS=/prepress input.ps