1TTF2PK(1)                   General Commands Manual                  TTF2PK(1)
2
3
4

NAME

6       ttf2pk - convert a TrueType font into TeX's PK format
7

SYNOPSIS

9       ttf2pk [-q] [-n] font-name resolution
10       ttf2pk -t [-q] font-name
11       ttf2pk --version | --help
12

DESCRIPTION

14       This  program converts a TrueType font into a PK file; the created font
15       can then be used with TeX or LaTeX.
16
17       CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts  as  created  by
18       ttf2tfm are also supported.
19
20       ttf2pk always assumes 10pt as the design size for the written TeX font.
21

PARAMETERS

23       -q     This  optional switch makes ttf2pk quiet.  It suppresses any in‐
24              formational output except warning and error messages.
25
26       -n     Use only `.pk' as the extension instead of `.<resolution>pk'.
27
28       -t     Test for the existence of font-name.  Returns 0 on  success  and
29              prints  out  the  corresponding  line  of  a  map file (default:
30              ttfonts.map), provided the -q switch isn't set.
31
32       font-name
33              The TeX name of the font.  ttf2pk looks this name up  in  a  map
34              file  (see  below)  for  further  information how to process the
35              font.
36
37       resolution
38              The resolution, given in dots per inch.  Currently the  horizon‐
39              tal  resolution is equal to the vertical resolution.  The design
40              size is always assumed to be 10pt.
41
42       --version
43              Shows the current version of ttf2pk and the used file search li‐
44              brary (e.g. kpathsea).
45
46       --help Shows usage information.
47
48       Environment  variables  for  file searching are described in the manual
49       page of ttf2tfm.
50

THE CONFIGURATION FILE

52       ttf2pk uses a small configuration file called ttf2pk.cfg; in each  line
53       it contains a keyword with its value, separated by whitespace.  Comment
54       lines can start with any of the following characters:  `*',  `#',  `;',
55       and `%'.  Leading whitespace is ignored.
56
57       Currently,  only  one  keyword,  `map',  is recognized in this file; it
58       takes a map file name as a parameter.  If no extension is given to  the
59       map  file  name, .map is appended.  No whitespace is allowed in the map
60       file name.  The `map' keyword can be given more than  once  to  specify
61       multiple  map  files; if the map file name is prepended by a plus sign,
62       it is added to the list of map files to be used.  Example:
63
64         map  foo
65         map +bar
66
67       This makes ttf2pk to first read foo.map, then bar.map.
68
69       If the configuration file is not found, ttf2pk tries to use ttfonts.map
70       instead.
71

MAP FILES

73       Parameters  specified to ttf2tfm are preserved for ttf2pk in map files—
74       ttf2tfm writes out to standard output, as the last line, a proper entry
75       for a map file.
76
77       As an example, a call to
78
79         ttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials
80
81       will produce the following line:
82
83         arials   arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc
84
85       See  ttf2tfm(1)  and afm2tfm(1) of the dvips package for a detailed de‐
86       scription of encoding files.
87
88       Here a table listing the various ttf2tfm parameters and the correspond‐
89       ing entries in a map file:
90
91           -s                  Slant
92           -e                  Extend
93           -p                  Encoding
94           -f                  Fontindex
95           -P                  Pid
96           -E                  Eid
97           -n                  PS=Yes
98           -N                  PS=Only
99           -R                  Replacement
100           -x                  Rotate=Yes
101           -y                  Y-Offset
102
103       Single  replacement  glyph  names  given to ttf2tfm with `-r old-glyph‐
104       name new-glyphname' are  directly  specified  with  `old-glyphname=new-
105       glyphname'.   They will be ignored if in subfont mode or if no encoding
106       file is given.
107
108       One additional parameter in a map file is unique to ttf2pk:  `Hinting',
109       which can take the values `On' or `Off'.  Some fonts (e.g. the CJK part
110       of cyberbit.ttf) are rendered incorrectly if hinting is activated.  De‐
111       fault is `On' (you can also use `Yes', `No', `1', and `0').
112
113       For   a   description   of   subfonts   (i.e.,   entries  of  the  form
114       `<namestem>@<sfd-filename>@') please refer to ttf2tfm(1).
115
116       The format of a map file is simple.  Each line defines  a  font;  first
117       comes  the TeX font name, then its TrueType font file name, followed by
118       the parameters in any order.  Case is significant (even  for  parameter
119       names);  the parameters are separated from its values by an equal sign,
120       with whitespace possibly surrounding it.  ttf2pk reads in all map files
121       line  by  line in the order given in the configuration file, continuing
122       until the TeX font specified on the command line  is  found,  otherwise
123       the  programs  exits with error code 2.  Thus you can use any character
124       invalid in a TeX font name to start a comment line.
125
126       You can use `\' as the final character of a line to indicate  that  the
127       input  is  continued on the next line.  The backslash and the following
128       newline character will be removed.
129
130       ttf2pk will abort if it can't find or read the TeX font metrics file of
131       the given TeX font name.
132

RETURN VALUE

134       If  the call was successful, 0 will be returned.  In case of error, the
135       return value is 1.  Finally, if the font can't  be  found  in  the  map
136       files,  2 is  returned.   This  simplifies the inclusion of ttf2pk into
137       scripts like mktexpk for automatic font generation.
138

SEE ALSO

140       ttf2tfm(1), afm2tfm(1)
141

AVAILABILITY

143       ttf2pk is part of the FreeType 1 package, a high quality TrueType  ren‐
144       dering library.
145

AUTHORS

147       Werner LEMBERG <wl@gnu.org>
148       Frédéric LOYER <loyer@ensta.fr>
149
150
151
152FreeType2 version                 04-May-2011                        TTF2PK(1)
Impressum