Getting pdflatex to embed all fonts

Update: a much simpler approach is described in Embedding fonts for IEEE.

My friend Yuhong reminded me to make sure I embed all fonts in the pdf file for our ICDM-05 paper. This seems to be an IEEE requirement.

Turns out to be a non trivial task, but not difficult. Here’s what I did (applies to a Linux TeTeX 3.0 distribution):

  1. As root, type “updmap –edit”, edit the config file so that it has the following content:

    #pdftexDownloadBase14 false
    pdftexDownloadBase14 true
  2. Run pdflatex over your document.
  3. Run pdffonts over the produced pdf file, all fonts should have true in the columns “emb” and “sub”.

Published by

Daniel Lemire

A computer science professor at the Université du Québec (TELUQ).

9 thoughts on “Getting pdflatex to embed all fonts”

  1. Thank you for this summary, it was very helpful as I was preparing a submission to a journal that wanted fonts embedded in the PDF. A few months later, tetex was updated and I noticed that it broke. Rerunning updmap as root was sufficient to fix the problem, the configuration files were untouched.

  2. Daniel, thank you very much for your clear summary, that works very well also under windows.
    I would suggest to all authors that are used to work with latex to follow this procedure, rather than generating a ps file and then converting it to pdf.

  3. Hi Daniel,

    thanks a lot for that! I was looking for an easy way to achieve embedding fonts. Yours worked without any problems!

    PS: For creating PS-Documents with all fonts embedded, one can use the parameter -Pdownload35 for dvips.

  4. Hi Daniel,

    It’s nice to solve a hard problem by a few linux commands. Yes, my problem of font embedding (+ subsetting) is solved in this way. But I had problems with colored image. So, I opened it in GIMP and saved it as grayscale. Then I got right behavior from pdflatex.

  5. Hi: Thanks for putting me on the right track.
    In my Ubuntu Linux v 6.06 — Dapper (and LIKELY on debian Sarge also) the file updmap.cfg is automatically generated. It asks the user NOT to modify it, and look at the files in the directory /etc/texmf/updmap.d/ instead.
    In that directory, the relevant file is: 00updmap.cfg
    One can edit this file and set the option :
    dvipsDownloadBase35 true
    The other relevant options seem to have been set to “embed all” during installation:
    pdftexDownloadBase14 true
    dvipdfmDownloadBase14 true
    The file contains plenty of comments explaining the various options. There are ways to overrule the file setting in specific cases.
    AFTER MODIFYING THIS FILE one should run: update-updmap

    I did the above with root (or sudo) privilege.


  6. Hi Jurgen,

    Regarding the -Pdownload35 option of dvips, the manual also says the option -Ppdf makes dvips try to “include Type 1 outline fonts”. I don’t know the relation between these two options.

  7. Unfortunately this doesn’t cause fonts in embedded images to be themselves embedded. For example, PDFs generated from Gnuplot use Helvetica by default. But the camera-ready prep document from a conference named CPVR provides a Ghostscript processing command that does the trick:

    gs -sDEVICE=pdfwrite -q -dBATCH -dNOPAUSE -dSAFER
    -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode
    -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode
    -c ‘> setdistillerparams’
    -f cvpr06.pdf
    -c quit

Comments are closed.