Truetype
Fonts for DVIPDFMx and PDFLaTeX
Ki-Joo Kim
May 28, 2004
Introduction
There are several methods
to use Truetype fonts with TeX:
-
Native
TTF for pdflatex [Radamir,Cheong,Lehman,Erbsland].
-
Native
TTF for dvipdfmx [Cho].
This dvipdfmx is now part of MiKTeX, fpTeX, and Win32TeX distributions.
It is mainly developed for using CJK Truetype fonts in PDF bookmark and
PDF search as well as in PDF body text.
-
TTF to PK for dvipdfm
and dvips [Radamir,Erbsland]..
-
TTF to Type 1 conversion
for dvipdfm, dvips, and pdflatex [Harders].
-
TTF to Type 42 conversion
for dvipdfm, dvips, and pdflatex [Chroboczk].
In this document we are using
MikTeX
TTF Font Installer [Erbsland] to install Truetype fonts for
for dvipdfm, dvips, and
pdflatex. This program is based on Damir Rakityansky's method [Radamir].
So the fonts in PDF will be:
-
dvipdfm
---> PK (Bitmap) font
-
dvips/ps2pdf ---> PK (Bitmap)
font
-
pdflatex
---> Native Truetype font
However, if you have installed
dvipdfmx,
you can also use native Truetype fonts in your PDF by just adding one map
file.
Font
Installation
MS Trebuchet fonts will used
in this document.
-
Copy the following font files
from "c:\windows\fonts"
to the current working directory: trebuc.ttf,
trebucit.ttf,
trebucbd.ttf,
and trebucbi.ttf.
-
MiKTeX
TTF Font Installer searches T1-WGL4.enc
file in "c:\texmf\ttf2tfm\base"
directory. Since there is no such a directory in MiKTeX 2.3, create the
directory and copy the encoding file to it.
-
Launch MiKTeX
TTF Font Installer program and select the above four TrueType
fonts. Then the program will do the rest.
-
The font map, ttfonts.map,
for dvipdfm and dvips is created in "c:\texmf\ttf2tfm\base".
Copy the contents of this file to ttfonts.map
in "c:\texmf\ttf2pk\base"
(if you use MiKTeX 2.3).
-
Note: There is another
font map, winfonts.map, which is for pdfLaTeX. This map file is
automatically registered in pdftex.cfg file. The font definition file,
t1trebuc.fd
is also created.
-
If
you have installed dvipdfmx,
-
Copy the contents of `ttfonts.map'
file and paste it to a new file, trebuc.map.
-
Put this file to "c:\localtexmf\dvipdfm\config"
directory.
-
Go to "c:\texmf\dvipdfm\config"
and open dvipdfmx.cfg file. Add
the the following line: f
trebuc.map.
-
Refresh file name database.
Test
This is a minimal example
file:
-
\documentclass{article}
-
\usepackage[T1]{fontenc}
-
\renewcommand{\rmdefault}{trebuc}
-
\begin{document}
-
Hello
\textsl{World!}.
I'm \emph{MS Trebuchet}.
-
\end{document}
If
you use dvipdfmx, you can see slanted
"World!" (even though this is not
much different from Italic shape due to sans serif font). However, you
cannot see slanted "World!" if you use pdflatex.
You
can also use dvips/ps2pdf. Printing of PS or PDF is still excellent but
the screen display is ugly as you know.
References
Last updated on 5/28/2004