contrib/OWB: add correct SDL dependency, fix compilers used
[AROS-Contrib.git] / freetype1 / contrib / ttf2pk / ttf2pk.1
blob64d5ece7e230dac380df3815f49c3037cf114e4e
1 .\" man page for ttf2pk
3 .TH TTF2PK 1 15-Aug-1999 "FreeType version 1.3"
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"
21 .B --help
22 .ad
23 .hy
27 .\" ====
28 .\" ==== macro definitions
29 .\" ====
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
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
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
52 .\" a typewriter font
53 .if t \{\
54 .de C
55 \fC\\$1\fP\\$2
57 .\}
58 .if n \{\
59 .de C
60 \\$1\\$2
62 .\}
64 .\" ====
65 .\" ==== end of macro definitions
66 .\" ====
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 All TrueType fonts to be used must be registered in a configuration
77 file called
78 .C \%ttfonts.map ;
79 it specifies how to handle each font.
80 CJKV (Chinese/Japanese/Korean/old Vietnamese) subfonts as created by 
81 .B ttf2tfm
82 are also supported.
83 .PP
84 .B ttf2pk
85 always assumes 10pt as the design size for the written \*(TX
86 font.
89 .SH PARAMETERS
90 .TP
91 .B -q
92 This optional switch makes
93 .B ttf2pk
94 quiet.
95 It suppresses any informational output except warning and error
96 messages.
97 .TP
98 .B -n
99 Use only `\c
100 .C \&.pk '
101 as the extension instead of `\c
102 .C \&. \c
103 .RI < \%resolution >\c
104 .C pk '.
106 .B -t
107 Test for the existence of
108 .IR \%font-name .
109 Returns 0 on success and prints out the corresponding line in
110 .C \%ttfonts.map
111 (provided the
112 .B -q
113 switch isn't set).
115 .I font-name
116 The \*(TX
117 name of the font.
118 .B ttf2pk
119 looks this name up in a configuration file called
120 .C \%ttfonts.map
121 for further information how to process the font.
123 .I resolution
124 The resolution, given in dots per inch.
125 Currently the horizontal resolution is equal to the vertical
126 resolution.
127 The design size is always assumed to be 10pt.
129 .B --version
130 Shows the current version of
131 .B ttf2pk
132 and the used file search library (e.g.\ \c
133 .BR kpathsea ).
135 .B --help
136 Shows usage information.
138 Environment variables for file searching are described in the manual page
140 .BR ttf2tfm .
143 .SH "THE CONFIGURATION FILE"
144 .B ttf2pk
145 uses, similar to
146 .BR dvips ,
147 a font definition file called
148 .C \%ttfonts.map .
149 The parameters specified to
150 .B ttf2tfm
151 are here preserved\(em\c
152 .B ttf2tfm
153 writes out to standard output, as the last line, a proper
154 configuration entry for
155 .C \%ttfonts.map .
157 As an example, a call to
159 .in +2m
160 .C "ttf2tfm arial -p T1.enc -s 0.25 -P 1 -E 0 arials"
162 will produce the following line:
164 .in +2m
165 .C "arials   arial Slant=0.25 Pid=1 Eid=0 Encoding=T1.enc"
168 .BR ttf2tfm (1)
170 .BR afm2tfm (1)
171 of the
172 .B dvips
173 package for a detailed description of encoding files.
175 Here a table listing the various
176 .B ttf2tfm
177 parameters and the corresponding
178 .C \%ttfonts.map
179 entries:
181 .in +4m
182 .ta 2i
183 -s      Slant
185 -e      Extend
187 -p      Encoding
189 -f      Fontindex
191 -P      Pid
193 -E      Eid
195 -n      PS=Yes
197 -N      PS=Only
199 -R      Replacement
201 -x      Rotate=Yes
203 -y      Y-Offset
205 Single replacement glyph names given to
206 .B ttf2tfm
207 with `\c
208 .BI -r \ old-glyphname\ new-glyphname\c
210 are directly specified with `\c
211 .IR old-glyphname = new-glyphname '.
212 They will be ignored if in subfont mode or if no encoding file is given.
214 One additional parameter in
215 .C \%ttfonts.map
216 is unique to
217 .BR ttf2pk :
218 `Hinting', which can take the values `On' or `Off'.
219 Some fonts (e.g.\ the CJK part of
220 .C \%cyberbit.ttf )
221 are rendered incorrectly if hinting is activated.
222 Default is `On' (you can also use `Yes', `No', `1', and `0').
224 For a description of subfonts (i.e., entries of the form `\c
225 .I <namestem>\c
226 .C @\c
227 .I <sfd-filename>\c
228 .C @ ')
229 please refer to
230 .BR ttf2tfm (1).
232 The format of
233 .C \%ttfonts.map
234 is  simple.
235 Each line defines a font; first comes the \*(TX
236 font name, then its TrueType font file name, followed by the
237 parameters in any order.
238 Case is significant (even for parameter names); the parameters are
239 separated from its values by an equal sign, with whitespace possibly
240 surrounding it.
241 .B ttf2pk
242 reads in
243 .C \%ttfonts.map
244 line by line, continuing until the \*(TX
245 font specified on the command line is found, otherwise the programs
246 exits with error code\ 2.
247 Thus you can use any character invalid in a \*(TX
248 font name to start a comment line.
250 You can use `\\' as the final character of a line to indicate that the
251 input is continued on the next line.
252 The backslash and the following newline character will be removed.
254 .B ttf2pk
255 will abort if it can't find or read the \*(TX
256 font metrics file of the given \*(TX
257 font name.
260 .SH "RETURN VALUE"
261 If the call was successful, 0\ will be returned.
262 In case of error, the return value is\ 1.
263 Finally, if the font can't be found in
264 .C \%ttfonts.map ,
265 2\ is returned.
266 This simplifies the inclusion of
267 .B ttf2pk
268 into scripts like
269 .B mktexpk
270 for automatic font generation.
273 .SH "SEE ALSO"
274 .BR ttf2tfm (1),
275 .BR afm2tfm (1)
278 .SH AVAILABILITY
279 .B ttf2pk
280 is part of the FreeType package, a high quality TrueType rendering
281 library.
284 .SH AUTHORS
285 Werner LEMBERG
286 .C <wl@gnu.org>
288 Fr\('ed\('eric LOYER
289 .C <loyer@ensta.fr>