[tex-live] Asymptote/DviPS and ghostscript (gone) epswrite device

Karl Berry karl at freefriends.org
Thu Feb 5 00:54:10 CET 2015



Well, it is not easy to digest those lengthy bug reports, full of
diatribes by various people against other various people, but as far as
I can make out, this is the standard problem of an eps file containing
references to glyphs (typically in figure captions), but not embedding
the fonts as needed.  For example, the diagram.eps in the 897284 has no
fonts embedded.

Such eps files has been common in the TeX world for decades, no matter
how much the ghostscript people might hate it, and I'm sorry they have
eradicated one of the routes people used to get their work done.

If the above is right, I think the only robust fix is to generate eps
files that do have the necessary fonts embedded.  For that, it seems the
bug must go to Asymptote.  John and I can discuss if he agrees (and has
any time to work on it).

For the moment, it should certainly be possible to pass the .eps through
Ghostscript to get the fonts embedded, before running through dvips.
I just did a bunch of experiments without conclusive results, due to
Ghostscript optimizing and compressing the output, but what comes to
mind is stuff like:
  eps2eps -dEmbedAllFonts diagram.eps foo.eps
or, more or less equivalently,
  epstopdf --device=ps2write diagram.eps -o foo.eps

There are an awful lot of (e)ps-to-something tools out there.  Sorry, I
don't have the energy to research and fight Ghostscript behavior down to
the bitter end right now.

FWIW, this situation occurs with some regularity with TUGboat
submissions.  Since what I want there is, ultimately, PDF, I run the
"final" pdf generated by dvips|gs or pdftex or whatever through gs
specifically to embed the fonts; works just as well with ps as input:
gs \
  -q -dNOPAUSE -dBATCH \
  -dEmbedAllFonts -dPDFSETTINGS=/prepress -dAutoRotatePages=/None \
  -sDEVICE=pdfwrite \
  -sOutputFile=output_name.pdf -c .setpdfwrite \
  -f input_name.pdf quit.ps

(This invocation is essentially copied from ps2pdfwr plus the embedding
options, which I suppose I should just call ... anyway ...)

One last note: I believe there is a bug in dvips wrt font embedding,
occurring when the same font is used in more than one figure file, each
needing different glyphs, but used under the same (PostScript) name.
(Unfortunately, I don't have a reference at hand.)  However, I don't get
the feeling that's what's happening here.

Feel free to paste this note into your suse reports if you think it'd be


More information about the tex-live mailing list