Pdf -dSubsetFonts=false选项停止显示TrueType字体/glyphshow

Pdf -dSubsetFonts=false选项停止显示TrueType字体/glyphshow,pdf,ghostscript,truetype,postscript,Pdf,Ghostscript,Truetype,Postscript,我有一个使用TrueType字体的PostScript。但是,我想包括一些罕见的字符,如注册号(®)和右/左单引号/双引号(“,”等) 所以我使用了glyphshow,并调用了glyphs的名称 %! << /PageSize [419.528 595.276] >> setpagedevice /DeviceRGB setcolorspace % Page 1 % % Set the Original to be the top left % 0 595.2

我有一个使用TrueType字体的PostScript。但是,我想包括一些罕见的字符,如注册号(®)和右/左单引号/双引号(“,”等)

所以我使用了glyphshow,并调用了glyphs的名称

%! 

<< /PageSize [419.528 595.276] >> setpagedevice 
/DeviceRGB setcolorspace 
% Page 1 

%
% Set the Original to be the top left
%
0 595.276 translate 
1 -1 scale 
gsave 
%
% Save this state before moving x y specifically for images
%

1 -1 scale 
/BauerBodoniBT-Roman findfont 30 scalefont setfont % set the pt size %-3.792 - 16 

1 0 0 setrgbcolor
10 -40 moveto /quoteright glyphshow
10 -80 moveto /registered glyphshow

/Museo-700 findfont 30 scalefont setfont % set the pt size %-3.792 - 16 

1 0 1 setrgbcolor
10 -120 moveto /quoteright glyphshow
10 -180 moveto /registered glyphshow


showpage 
但是,上述命令现在会导致将其拉入Illustrator时出现问题。罕见的标志符号变得不可识别(',Æ)。普通字符和常规标志符号看起来很好,即/glyphshow和just show文本显示在pdf和Illustrator中

因此,似乎将SubsetFonts选项设置为True会显示罕见的图示符,但这会阻止我将PDF拖到Illustrator中

随附TrueType字体供参考和两个PDF(一个带有subsetfont选项为truw,另一个为非默认)

我还尝试了以下命令,但结果相同(PDF上没有可见的图示符,Illustrator错误地显示图示符)

但使用此命令,如果有帮助,我也会从PDF中获得飞行前错误:

“PDF中的字形宽度信息与嵌入字体中的宽度信息不匹配”

附件是上面提到的所有文件-


对字体进行编码也不会产生好的结果

我在PostScript中编码了一个TrueType(和一个Type42)字体,并列出了一些要显示的新字符

结果如下:

命令1:

gs -o encode_ttf_subset_false.pdf -sDEVICE=pdfwrite -dSubsetFonts=false encode.ps
结果1: 在Acrobat中打开PDF不会显示任何字形显示字符

命令2:

gs -o encode_ttf_subset_true.pdf -sDEVICE=pdfwrite encode.ps
结果2: 在Acrobat中打开PDF,它会显示字形显示字符,但不会在Illustrator中显示

命令3:

gs -o encode_ttf_subset_false_embedtrue.pdf -sDEVICE=pdfwrite -dSubsetFonts=false -dEmbedAllFonts=true encode.ps
结果3: 与结果1相同(不显示glyphshow字符)

下面是我的新PostScript,带有编码的TTF和Type42(我还将它们包含在下面的文件中)

这至少是Ghostscript的一个bug吗

/museobold findfont dup  %%%%% This is the Type42 Font
length dict
copy begin

/Encoding Encoding 256 array copy def 
Encoding 1 /oacute put
Encoding 2 /aacute put
Encoding 3 /eacute put
Encoding 4 /questiondown put
Encoding 5 /quotedblleft put
Encoding 6 /quoteright put
Encoding 7 /quotedblbase put

/museobold-Esp currentdict definefont pop

end

/museobold-Esp 18 selectfont

72 600 moveto
(\005D\001lnde est\002 el camino a San Jos\003? More characters \006 and \007) show

%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%

/BauerBodoniBT-Roman findfont dup
length dict
copy begin

/Encoding Encoding 256 array copy def 
Encoding 1 /oacute put
Encoding 2 /aacute put
Encoding 3 /eacute put
Encoding 4 /questiondown put
Encoding 5 /quotedblleft put
Encoding 6 /quoteright put
Encoding 7 /quotedblbase put

/BauerBodoniBT-Roman-Esp currentdict definefont pop

end

/BauerBodoniBT-Roman-Esp 18 selectfont

72 630 moveto
(\005D\001lnde est\002 el camino a San Jos\003? More characters \006 and \007) show

showpage

单击下载以下内容:BBBTRom.ttf(TrueType字体);3个PDF(结果1、2和3);MuseBold(使用ttftotype42将TrueType字体转换为Type42)和encode.ps.

这又回到了使用Illustrator作为通用PDF应用程序的问题上。它无法做到这一点。现在,正如您所注意到的,您在过去找到了解决这一问题的方法,这次我相信您运气不好

PostScript glypshow运算符没有PDF等效项。此外,由于glyphshow的工作方式,我们不能简单地使用任何现有字体实例来存储glyph(因为编码中可能不存在,也可能不存在glyph)。因此,pdfwrite做了它唯一能做的事情。它生成了一种新字体,该字体仅由glyphshow使用的特定原始字体字符串中的字形组成

因为我们没有可以使用的编码,所以我们必须使用自定义(suymbolic)编码(因为PDF文件中的字体具有编码),根据您以前的经验,我怀疑这意味着Illustrator无法读取我们嵌入的字体

我不鼓励将glyphshow与pdfwrite一起使用

话虽如此,当SubsetFonts为真时,PDF文件应该不会有问题,尽管我确实有一个类似的开放错误报告。你实际上没有说你使用的是哪个版本的Ghostscript,所以我不能确定这是否是相同的问题。(我也没有相同的字体等)。请注意,这不是(我相信)与Illustrator的问题有关,这是由于您使用glyphshow和Illustrator的一些限制造成的


作为一般规则,我不会使用-dPDFSETTINGS,当然不会在尝试调试问题时使用,也不会将输出限制为PDF 1.3。

Hi Ken,感谢您的回复。我使用的GhostScript是GhostScript 9.16(2015-03-30)。至于glyphshow,老实说,我并不真的想用这个。我之所以看这个,是因为我无法通过使用show命令时使用的字体显示特殊字符。我找了十六进制(似乎也不起作用)和ASCII,但找了那个字符(右单引号)不可用。继续:如果有帮助的话,我已将两种TrueType字体都包含在附加的zip文件中。如何使用show显示特殊字符?例如,它用于singlerightquote('))如果这是可行的,那么我就不需要使用glyphshow…交叉手指,我会在测试时去掉设置和版本:)要使用字体中的特定字形,你应该将它们添加到该字体的编码中。但是,你不能在PostScript中直接使用TrueType字体,它们需要转换为42型。Ghostscript已经一些扩展会自动神奇地为您处理这一问题,但当然这不能解释所有的可能性。正确的方法是将TT字体转换为一种或多种类型42字体,使用包含您所需的所有字形的特定编码,并将其嵌入PostScript。这样做超出了尽管如此,请回答。谢谢。我有能力将它们转换为Type42,但这仍然是SubsetFont选项的问题。我将在脚本中使用编码更新我的答案以显示。SubsetFont的问题与使用glyphshow的问题不同,但我想只要您使用,您就永远无法在Illustrator中使用它glyphshow,因为字体的创建和嵌入方式。至少在Adobe修复Illustrator中的限制之前。。。。
gs -o encode_ttf_subset_false_embedtrue.pdf -sDEVICE=pdfwrite -dSubsetFonts=false -dEmbedAllFonts=true encode.ps
/museobold findfont dup  %%%%% This is the Type42 Font
length dict
copy begin

/Encoding Encoding 256 array copy def 
Encoding 1 /oacute put
Encoding 2 /aacute put
Encoding 3 /eacute put
Encoding 4 /questiondown put
Encoding 5 /quotedblleft put
Encoding 6 /quoteright put
Encoding 7 /quotedblbase put

/museobold-Esp currentdict definefont pop

end

/museobold-Esp 18 selectfont

72 600 moveto
(\005D\001lnde est\002 el camino a San Jos\003? More characters \006 and \007) show

%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%

/BauerBodoniBT-Roman findfont dup
length dict
copy begin

/Encoding Encoding 256 array copy def 
Encoding 1 /oacute put
Encoding 2 /aacute put
Encoding 3 /eacute put
Encoding 4 /questiondown put
Encoding 5 /quotedblleft put
Encoding 6 /quoteright put
Encoding 7 /quotedblbase put

/BauerBodoniBT-Roman-Esp currentdict definefont pop

end

/BauerBodoniBT-Roman-Esp 18 selectfont

72 630 moveto
(\005D\001lnde est\002 el camino a San Jos\003? More characters \006 and \007) show

showpage