[Tex/LaTex] How to embed fonts at compile time with pdflatex


I just ran into the problem of embedding fonts while trying to publish with lulu.com. Although everyone apparently is 'supposed' to handle those 35 standard fonts for some strange reason they won't accept pdf's without them included. So one way that according to Daniel Lemire's blog is supposed to work (I haven't tried yet, but hopefully it does work) is to convert the pdf to ps and then back to pdf and include the fonts at that time:

pdftops file.pdf
ps2pdf14 -dPDFSETTINGS=/prepress file.ps

But this feels at least to me like the wrong way of doing things. Is there some way of passing the parameter directly to pdflatex to tell it to embed those fonts?

And, if not — How do we go about getting such a feature? (Because it can't only be me who has this sort of problems)

Best Answer

Make sure the pdftexDownloadBase14 settings in the updmap.cfg file is set to true to make pdflatex to embed the base 14 pdf fonts. If you use normal latex then you should set dvipdfmDownloadBase14 to true. Best set both. On my TeXLive 2010 installation it is already set to true and I had never issues with my IEEE paper submissions.

You can edit this config file by running updmap --edit (under Linux most likely as root using sudo beforehand; not sure about M$ Windows).

Here the explanation from the updmap.cfg file:

# pdftexDownloadBase14
# Should pdftex download the base 14 pdf fonts? Since some configurations
# (ps / pdf tools / printers) use bad default fonts, it is safer to download
# the fonts. The pdf files will get bigger, though.
# Valid settings are true (download the fonts) or false (don't download
# the fonts). Adobe recommends embedding all fonts.
pdftexDownloadBase14 true

Also make sure that PDF or EPS files you include as images include all their fonts by themselves. This can be an issue if you generate these PDF or EPS images from e.g. M$ Office like Visio, because they use most definitive different fonts. AFAIK LaTeX can not include this missing fonts because they are not part of the main document but of the embedded object (image). The only solution here is to embed the fonts to them first, either by re-generate them with the correct settings in the software you use for this (e.g. PDF printer) or by running the ps2pdf14 command you mentioned on the images beforehand not the final document.