fixing /invalidfont in ghostscript

Recently I updated ghostscript, and it stopped working even on its own examples:


$ pwd
/usr/share/ghostscript/8.15/examples
$ ps2pdf alphabet.ps ~/a.pdf
ERROR: /invalidfont in findfont
Operand stack:
   (Palatino-Italic)   Font   (Palatino-Italic)   228176   (Palatino-
   Italic)   --nostringval--   (Palatino-Italic)   URWPalladioL-Ital
   Times-Italic   NimbusRomNo9L-ReguItal
Execution stack:
...

It seems there is some problem with fonts and search path. Probably, something is updated in the algorithm. I didn't have a lot of time to find what's wrong, so I implemented a quick fix.

First I run:

strace -o ~/gvtr ps2pdf alphabet.ps ~/a.pdf

This command produced a trace file of executing "ps2pdf". I searched for "pfb" (an extension for Type1 fonts), and the first match was "p052023l.pfb". The program was unable to find this file. The file exists on the file system:

$ find /usr/share/fonts/ -name 'p052023l.pfb'
/usr/share/fonts/default/Type1/p052023l.pfb

After thinking on the output from "gs -h", the section "Search path", I made a quick dirty fix, but it works for me:

# pwd
/usr/share/ghostscript
# ln -s /usr/share/fonts/default/Type1 fonts
Categories: publishing

Updated: