2

So, I have a PostScript that I'm converting into PDF using a custom font i.e. one that isn't included in the computer/Ghostscript library originally.

The font is rendered correctly in the PDF (visbly and its embedded stated by the pre-flight prespress analysis), and when the PDF is viewed in Photoshop it looks good also.

However, the issue is when I bring it into Illustrator the font glyphs are not recognised and appear as a .notdef character (a rectangle with a cross through it).

Within Illustrator I have the font installed when I view it in my dropdown of fonts. But this still doesn't help.

Has anyone else had this issue or can even replicate it?

I have used two (following) processed to include fonts into my ghostscript environment to troubleshoot but both produce incorrect results.

  1. Converted the TTF into Type42
  2. Added TTF into Ghostscript FontMap

Attached is the ZIP file containing the PDF and the TTF font I've used (I have used others also with the same results). If you need anymore files please let me know and I'll update.

Zip file

Below is the PostScript file (very simple) and my execution.

%!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

Command:

gs -o fonttest.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 \
   -dPDFSETTINGS=/prepress fonttest.ps

P.S.: I know that this could be an Illustrator bug, to which I have opened up a support ticket, but this can also be the way I'm embedding the font or someone out there may just have the answer :D

Sevle
  • 3,109
  • 2
  • 19
  • 31
MissAran
  • 125
  • 9
  • 1
    It all looks perfectly valid to me, and I've tried a couple of PDF consumers without trouble. Note that although Illustrator saves its files in what appear to be PDF format, that's not really how it works, and Illustrator is not a general purpose PDF editing application. Since the font is available to you externally, you could try *not* embedding the font and see if Illustrator is happy with it then. It may be the custom encoding it doesn't like so you could also try turning off subsetting. Why do you want to load the PDF into Illustrator anyway ? – KenS May 28 '15 at 15:23
  • Hi Ken. You wouldn't believe I solved the 'issue' a few minutes after I posted. Basically, the Ghostscript seems to subset the font in (this thread pointed me in the right direction [here](http://stackoverflow.com/questions/1418110/how-to-make-ghostscript-ps2pdf-stop-subsetting-fonts) which causes the issue. I'll post my answer underneath. To answer your question about illustrator unfortunatelt it's a requirement by my designer :D Gotta give them some love from time to time in our office. – MissAran May 28 '15 at 15:40

1 Answers1

3

I found this thread UTF-8 PDF generated with TCPDF showing up fine in Adobe Acrobat but corrupted in Illustrator and Google preview which spoke about corruption in Illustrator.

Using this I thought that it was likely subsetting causing the issue in ghostscript.

Found this thread How to make GhostScript PS2PDF stop subsetting fonts and applied the Ghostscript options to stop font subsetting.

So in my command to Ghostscript I use the

-dSubsetFonts=false

and that worked! In Illustrator the font displays as expected.

So my full gs command is:

gs -o output.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 \
   -dSubsetFonts=false -dPDFSETTINGS=/prepress input.ps
Community
  • 1
  • 1
MissAran
  • 125
  • 9