Jeremy Witmer
Jeremy Witmer

Reputation: 169

Embedding Fonts in PDF from LaTeX Source with pdflatex

I need to embed the fonts that I'm using in my TeX document in my output PDF. I'm using pdflatex for TeX processing, and TextMate as my editor.

I can't find any reference on how to embed the fonts I need in the PDF document.

Upvotes: 5

Views: 10750

Answers (2)

Mikaël Mayer
Mikaël Mayer

Reputation: 10710

Include the following line in your mypaper.tex file:

\usepackage[T1]{fontenc}

Compile to pdf after using latex:

dvipdfm -p letter mypaper

I checked using pdffonts, no more T3 fonts. Bingo.

Upvotes: 0

derobert
derobert

Reputation: 51197

From the pdfTex documentation,

5 Setting up fonts

pdfTEX can work with Type 1 and TrueType fonts (and to some extent also with OpenType fonts). Font les should be available and embedded for all fonts used in the document. It is possible to use METAFONT-- generated fonts in pdfTEX but it is strongly recommended not to use these fonts if an equivalent is available in Type 1 or TrueType format, if only because bitmap Type 3 fonts render very poorly in (older versions of) Adobe Reader. Given the free availability of Type 1 versions of all the Computer Modern fonts, and the ability to use standard PostScript fonts, there is rarely a need to use bitmap fonts in pdfTEX.

You probably need to either install the Type 1 Computer Modern fonts. Modern tex-live has them. If you have an older TeX distro, there is lmodern:

\documentclass{article}
\usepackage{lmodern}
\begin{document}

Hello, world.

\end{document}

Now, if you check the fonts in the resulting document with, e.g., pdffonts:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
SZVHEC+LMRoman10-Regular             Type 1            yes yes no       4  0

Bingo. Embedded type 1 font.

Upvotes: 4

Related Questions