Debian Codegraph @

texmf-dist/doc/man/man1/ttf2pk.1

raw
1 .\" man page for ttf2pk
2 .
3 .TH TTF2PK 1 04-May-2011 "FreeType2 version"
4 .SH NAME
5 ttf2pk \- convert a TrueType font into TeX's PK format
6 .SH SYNOPSIS
7 .na
8 .nh
9 .B ttf2pk
10 .RB [ \-q ]
11 .RB [ \-n ]
12 .I "\%font-name \%resolution"
13 .br
14 .B ttf2pk
15 .B \-t
16 .RB [ \-q ]
17 .I \%font-name
18 .br
19 .B "ttf2pk \-\^\-version"
20 |
21 .B \-\^\-help
22 .ad
23 .hy
24 .
25 .
26 .
27 .\" ====
28 .\" ==== macro definitions
29 .\" ====
30 .
31 .\" here we define \TeX for troff and nroff
32 .if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
33 .if n .ds TX TeX
34 .
35 .\" and here the same for \LaTeX
36 .if t \{\
37 .ie '\*(.T'dvi' \
38 .ds LX \fRL\h'-0.36m'\v'-0.15v'\s-3A\s0\h'-0.15m'\v'0.15v'\fP\*(TX
39 .el .ds LX \fRL\h'-0.36m'\v'-0.22v'\s-2A\s0\h'-0.15m'\v'0.22v'\fP\*(TX
40 .\}
41 .if n .ds LX LaTeX
42 .
43 .\" \LaTeXe
44 .\" note that we need \vareps for TeX instead of \eps which can only be
45 .\" accessed with the \N escape sequence (in the Math Italic font)
46 .if t \{\
47 .ie '\*(.T'dvi' .ds LE \*(LX\h'0.15m'2\v'0.20v'\f(MI\N'34'\fP\v'-0.20v'
48 .el .ds LE \*(LX\h'0.15m'2\v'0.20v'\(*e\v'-0.20v'
49 .\}
50 .if n .ds LE LaTeX\ 2e
51 .
52 .\" a typewriter font
53 .if t \{\
54 .de C
55 \fC\\$1\fP\\$2
56 ..
57 .\}
58 .if n \{\
59 .de C
60 \\$1\\$2
61 ..
62 .\}
63 .
64 .\" ====
65 .\" ==== end of macro definitions
66 .\" ====
67 .
68 .
69 .
70 .SH DESCRIPTION
71 This program converts a TrueType font into a
72 .C PK
73 file; the created font can then be used with \*(TX
74 or \*(LX.
75 .PP
76 CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts as created by
77 .B ttf2tfm
78 are also supported.
79 .PP
80 .B ttf2pk
81 always assumes 10pt as the design size for the written \*(TX
82 font.
83 .
84 .
85 .SH PARAMETERS
86 .TP
87 .B \-q
88 This optional switch makes
89 .B ttf2pk
90 quiet.
91 It suppresses any informational output except warning and error
92 messages.
93 .TP
94 .B \-n
95 Use only `\c
96 .C \&.pk '
97 as the extension instead of `\c
98 .C \&. \c
99 .RI < \%resolution >\c
100 .C pk '.
101 .TP
102 .B \-t
103 Test for the existence of
104 .IR \%font-name .
105 Returns 0 on success and prints out the corresponding line of
106 a map file (default:
107 .C \%ttfonts.map ),
108 provided the
109 .B \-q
110 switch isn't set.
111 .TP
112 .I font-name
113 The \*(TX
114 name of the font.
115 .B ttf2pk
116 looks this name up in a map file (see below) for further information how
117 to process the font.
118 .TP
119 .I resolution
120 The resolution, given in dots per inch.
121 Currently the horizontal resolution is equal to the vertical
122 resolution.
123 The design size is always assumed to be 10pt.
124 .TP
125 .B \-\^\-version
126 Shows the current version of
127 .B ttf2pk
128 and the used file search library (e.g.\ \c
129 .BR kpathsea ).
130 .TP
131 .B \-\^\-help
132 Shows usage information.
133 .PP
134 Environment variables for file searching are described in the manual page
135 of
136 .BR ttf2tfm .
137 .
138 .
139 .SH "THE CONFIGURATION FILE"
140 .B ttf2pk
141 uses a small configuration file called
142 .C ttf2pk.cfg ;
143 in each line it contains a keyword with its value, separated by whitespace.
144 Comment lines can start with any of the following characters: `*', `#',
145 `;', and `%'.
146 Leading whitespace is ignored.
147 .PP
148 Currently, only one keyword, `map', is recognized in this file; it takes
149 a map file name as a parameter.
150 If no extension is given to the map file name,
151 .C \&.map
152 is appended.
153 No whitespace is allowed in the map file name.
154 The `map' keyword can be given more than once to specify multiple map
155 files; if the map file name is prepended by a plus sign, it is added to
156 the list of map files to be used.
157 Example:
158 .PP
159 .in +2m
160 .C "map foo"
161 .br
162 .C "map +bar"
163 .PP
164 This makes
165 .B ttf2pk
166 to first read
167 .C foo.map ,
168 then
169 .C bar.map .
170 .PP
171 If the configuration file is not found,
172 .B ttf2pk
173 tries to use
174 .C \%ttfonts.map
175 instead.
176 .
177 .
178 .SH "MAP FILES"
179 Parameters specified to
180 .B ttf2tfm
181 are preserved for
182 .B ttf2pk
183 in map files\(em\c
184 .B ttf2tfm
185 writes out to standard output, as the last line, a proper entry for a
186 map file.
187 .PP
188 As an example, a call to
189 .PP
190 .in +2m
191 .C "ttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials"
192 .PP
193 will produce the following line:
194 .PP
195 .in +2m
196 .C "arials arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc"
197 .PP
198 See
199 .BR ttf2tfm (1)
200 and
201 .BR afm2tfm (1)
202 of the
203 .B dvips
204 package for a detailed description of encoding files.
205 .PP
206 Here a table listing the various
207 .B ttf2tfm
208 parameters and the corresponding entries in a map file:
209 .PP
210 .in +4m
211 .ta 2i
212 -s Slant
213 .br
214 -e Extend
215 .br
216 -p Encoding
217 .br
218 -f Fontindex
219 .br
220 -P Pid
221 .br
222 -E Eid
223 .br
224 -n PS=Yes
225 .br
226 -N PS=Only
227 .br
228 -R Replacement
229 .br
230 -x Rotate=Yes
231 .br
232 -y Y-Offset
233 .PP
234 Single replacement glyph names given to
235 .B ttf2tfm
236 with `\c
237 .BI \-r \ old-glyphname\ new-glyphname\c
238 \&'
239 are directly specified with `\c
240 .IR old-glyphname = new-glyphname '.
241 They will be ignored if in subfont mode or if no encoding file is given.
242 .PP
243 One additional parameter in a map file is unique to
244 .BR ttf2pk :
245 `Hinting', which can take the values `On' or `Off'.
246 Some fonts (e.g.\ the CJK part of
247 .C \%cyberbit.ttf )
248 are rendered incorrectly if hinting is activated.
249 Default is `On' (you can also use `Yes', `No', `1', and `0').
250 .PP
251 For a description of subfonts (i.e., entries of the form `\c
252 .I <namestem>\c
253 .C @\c
254 .I <sfd-filename>\c
255 .C @ ')
256 please refer to
257 .BR ttf2tfm (1).
258 .PP
259 The format of a map file is simple.
260 Each line defines a font; first comes the \*(TX
261 font name, then its TrueType font file name, followed by the
262 parameters in any order.
263 Case is significant (even for parameter names); the parameters are
264 separated from its values by an equal sign, with whitespace possibly
265 surrounding it.
266 .B ttf2pk
267 reads in all map files line by line in the order given in the
268 configuration file, continuing until the \*(TX font specified on the
269 command line is found, otherwise the programs exits with error code\ 2.
270 Thus you can use any character invalid in a \*(TX
271 font name to start a comment line.
272 .PP
273 You can use `\\' as the final character of a line to indicate that the
274 input is continued on the next line.
275 The backslash and the following newline character will be removed.
276 .PP
277 .B ttf2pk
278 will abort if it can't find or read the \*(TX
279 font metrics file of the given \*(TX
280 font name.
281 .
282 .
283 .SH "RETURN VALUE"
284 If the call was successful, 0\ will be returned.
285 In case of error, the return value is\ 1.
286 Finally, if the font can't be found in the map files,
287 2\ is returned.
288 This simplifies the inclusion of
289 .B ttf2pk
290 into scripts like
291 .B mktexpk
292 for automatic font generation.
293 .
294 .
295 .SH "SEE ALSO"
296 .BR ttf2tfm (1),
297 .BR afm2tfm (1)
298 .
299 .
300 .SH AVAILABILITY
301 .B ttf2pk
302 is part of the FreeType\ 1 package, a high quality TrueType rendering
303 library.
304 .
305 .
306 .SH AUTHORS
307 Werner LEMBERG
308 .C <[email protected]>
309 .br
310 Fr\('ed\('eric LOYER
311 .C <[email protected]>