Section: User Commands (1)
Return to Main Contents
ttf2pk - convert a TrueType font into TeX's PK format
This program converts a TrueType font into a
file; the created font can then be used with TeX
CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts as created by
are also supported.
always assumes 10pt as the design size for the written TeX
This optional switch makes
It suppresses any informational output except warning and error
Use only `
as the extension instead of `
Test for the existence of
Returns 0 on success and prints out the corresponding line of
a map file (default:
switch isn't set.
name of the font.
looks this name up in a map file (see below) for further information how
to process the font.
The resolution, given in dots per inch.
Currently the horizontal resolution is equal to the vertical
The design size is always assumed to be 10pt.
Shows the current version of
and the used file search library (e.g. kpathsea).
Shows usage information.
Environment variables for file searching are described in the manual page
THE CONFIGURATION FILE
uses a small configuration file called
in each line it contains a keyword with its value, separated by whitespace.
Comment lines can start with any of the following characters: `*', `#',
`;', and `%'.
Leading whitespace is ignored.
Currently, only one keyword, `map', is recognized in this file; it takes
a map file name as a parameter.
If no extension is given to the map file name,
No whitespace is allowed in the map file name.
The `map' keyword can be given more than once to specify multiple map
files; if the map file name is prepended by a plus sign, it is added to
the list of map files to be used.
to first read
If the configuration file is not found,
tries to use
Parameters specified to
are preserved for
in map files---ttf2tfm
writes out to standard output, as the last line, a proper entry for a
As an example, a call to
will produce the following line:
package for a detailed description of encoding files.
Here a table listing the various
parameters and the corresponding entries in a map file:
Single replacement glyph names given to
with `-r old-glyphname new-glyphname'
are directly specified with `old-glyphname=new-glyphname'.
They will be ignored if in subfont mode or if no encoding file is given.
One additional parameter in a map file is unique to
`Hinting', which can take the values `On' or `Off'.
Some fonts (e.g. the CJK part of
are rendered incorrectly if hinting is activated.
Default is `On' (you can also use `Yes', `No', `1', and `0').
For a description of subfonts (i.e., entries of the form `<namestem>
please refer to
The format of a map file is simple.
Each line defines a font; first comes the TeX
font name, then its TrueType font file name, followed by the
parameters in any order.
Case is significant (even for parameter names); the parameters are
separated from its values by an equal sign, with whitespace possibly
reads in all map files line by line in the order given in the
configuration file, continuing until the TeX font specified on the
command line is found, otherwise the programs exits with error code 2.
Thus you can use any character invalid in a TeX
font name to start a comment line.
You can use `\' as the final character of a line to indicate that the
input is continued on the next line.
The backslash and the following newline character will be removed.
will abort if it can't find or read the TeX
font metrics file of the given TeX
If the call was successful, 0 will be returned.
In case of error, the return value is 1.
Finally, if the font can't be found in the map files,
2 is returned.
This simplifies the inclusion of
into scripts like
for automatic font generation.
is part of the FreeType 1 package, a high quality TrueType rendering
- THE CONFIGURATION FILE
- MAP FILES
- RETURN VALUE
- SEE ALSO