Embed this, mofo!

Oh, I've been really struggling with my fonts. I'm sure I've complained about this before, but I can't find the reference. A number of idiotic publishing companies (ahem, IEEE and ACM) have recently started getting really snotty about embedding fonts into files. In particular, they complain like crazy if you don't embed fonts like symbol and helvetica into your PDF files when you send them to get published. This is particularly idiotic, since these files are part of the "14 base fonts" which every PDF reader must be able to render without needed the fonts to be embedded. So it's a pretty ridiculous rule, and I've wasted some amount of my life whinging at them for having such a rule. In particular, because some perfectly nice PDFs generated by pdflatex have been rejected for this reason. These folks wouldn't give any useful suggestions about how to fix the problem, other than "send us the PS version, and we can generate the compliant PDF." But I'm using PDFLaTeX -- there is no PS version (not even a DVI version). Generating PS would be silly, I'd have to use pdf2ps or similar.
Finally today, I have worked out a clean solution which does not offend me.

Firstly, it turns out that most of the problem is actually coming from the embedded graphics. pdflatex itself does seem to satisfactorily embed most fonts, although you can force it to if necessary, and there are various sites around which say how to do this. But this doesn't help included PDF figures which don't have fonts embedded already. For xfig and so on (another tip: in xfig, the "view --> portrait/landscape" option will fix it so that your figure is output with the correct orientation if it's coming out twisted when you export it), just export direct to PDF and it should work. But some figures are generated in eps format, and then converted to PDF. Usually, I use epstopdf to do this, since it gets the bounding box right, but it doesn't seem to do the trick. So here is what you need to do: issue the command
export GS_OPTIONS=-dPDFSETTINGS=/prepress

and then all will be well. You can work it out for yourself why this will work.

No comments: