Truetype Fonts for DVIPDFMx and PDFLaTeX

Ki-Joo Kim
May 28, 2004


Introduction

There are several methods to use Truetype fonts with TeX:

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: 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.

  1. Copy the following font files from "c:\windows\fonts" to the current working directory: trebuc.ttf, trebucit.ttf, trebucbd.ttf, and trebucbi.ttf.
  2. 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.
  3. Launch MiKTeX TTF Font Installer program and select the above four TrueType  fonts. Then the program will do the rest.
  4. 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).
  5. 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.
  6. If you have installed dvipdfmx,
    1. Copy the contents of `ttfonts.map' file and paste it to a new file,  trebuc.map.
    2. Put this file to "c:\localtexmf\dvipdfm\config" directory.
    3. Go to "c:\texmf\dvipdfm\config" and open  dvipdfmx.cfg file. Add the the following line: f trebuc.map.
  7.  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


Hosted by www.Geocities.ws

1