This is version 0.1 of the ttf2texfonts Manual
Copyright © 2005 Glad Deschrijver
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found here: GNU Free Documentation License.
Table of Contents
Abstract
ttf2texfonts produces and installs Postscript fonts from Truetype fonts and the other necessary files needed to use the fonts in LaTeX.
ttf2texfonts is a Unix shell script which starting from a Truetype font stored in one or more files produces a Postscript font and the necessary files needed for LaTeX, and installs these files in the TeX directory structure. The script allows to install a Truetype font as a Postscript font for LaTeX by issuing just one command without the need for any further configuration.
You will only be able to use this script successfully if your TeX system uses updmap. If your system does not have updmap, then the files will be installed anyway, but you will have to make sure yourself that TeX and dvips find them.
In order to be able to run this script, you must first install ttf2pt1.
The first time you use this script, some initialisation must be done. This can be done by running the following command:
$ ttf2texfonts --initThis copies the file updmap.cfg from the
system-wide $TEXMF-directory (which is assumed to be
/usr/share/texmf; this can be changed in the
source code of ttf2texfonts, therefore
you should change the variable systemtexmf)
to your local $TEXMF-directory (change the variable
texmf in the source code of
ttf2texfonts to the full path of your
local $TEXMF-directory). You can change the path to the local
$TEXMF-directory at the command line with the option
--texmf=.
From now on we will use the notation
/path/to/new/local/texmf$localtexmf for your local $TEXMF-directory.
Then the line
Map ttf.map
is added to the local updmap.cfg (a name
other than ttf.map
can be chosen by changing the variable ttfmap2
in the source code of ttf2texfonts).
The font information necessary to allow
dvips to find the Postscript
fonts used by LaTeX will be stored in the file
ttf.map, which will be installed in
$localtexmf/dvips/misc
The script will automatically create the necessary
directories in $localtexmf if they are
not already there.
You can obtain help on the command-line by issuing:
$ ttf2texfonts --helpTo create the Postscript fonts and the necessary files
needed by TeX, you need to run ttf2texfonts
with one or more of the options
--regular=,
fontfile1.ttf--bold=,
fontfile2.ttf--italic=,
fontfile3.ttf--bolditalic=.
The files fontfile4.ttffontfile1.ttf,
fontfile2.ttf,
fontfile3.ttf and
fontfile4.ttf are Truetype font-files
which contain the normal, bold, italic and bold italic typefaces
of the font, and will be used to produce one Postscript font for
TeX. Additionally, you have to specify the TeX-name of the
output font.
Installing a font can be done by running
ttf2texfonts with the option
--install. The TeX-name of the output font
should also be specified. The files will be installed in
$localtexmf, respecting the
TDS (TeX Directory Structure).
Example 1. Create and install fonts
In order to create and install the Postscript font
foo for TeX
from the TrueType fonts bar.ttf
(regular typeface) and barb.ttf
(bold typeface), you run the following commands:
$ttf2texfonts --regular=bar.ttf--bold=barb.ttffoo$ttf2texfonts --installfoo
Creating and installing the fonts can be done in a single step by running the command:
$ttf2texfonts --regular=bar.ttf--bold=barb.ttf--installfoo
To install the fonts in the directory
,
you run e.g.:/path/to/new/local/texmf
$ttf2texfonts --install --texmf=/path/to/new/local/texmffoo
In your LaTeX-documents use e.g.:
\usefont{T1}{foo}{m}{n}\selectfontThe above process will produce a lot of files needed by
TeX in the current working directory. After installing these
files, they can be removed from the working directory by running
ttf2texfonts with the option
--clean.
The option --uninstall can be used to
remove the font from the TeX system.
Example 2. Clean up working directory and uninstalling fonts
In order to clean up the working directory after
installing the TeX font foo, you
run the command:
$ttf2texfonts --cleanfoo
Uninstalling foo can be done with:
$ttf2texfonts --uninstallfoo
The file ttf.map will be updated
automatically each time a font is installed or uninstalled.
The command updmap is also automatically
issued in order to update the configuration of your TeX
system.
The option --clean takes precedence
when combined with other options (so the other options will
be ignored). The option
--help takes precedence even over
--clean.
This file is created using a DocBook document and uses a CSS stylesheet.