OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / GNU_groff / original / man5 / groff_font.5
1 .ig
2 Copyright (C) 1989-1995, 2001 Free Software Foundation, Inc.
3
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
7
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
12
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
17 the original English.
18 ..
19 .de TQ
20 .br
21 .ns
22 .TP \\$1
23 ..
24 .\" Like TP, but if specified indent is more than half
25 .\" the current line-length - indent, use the default indent.
26 .de Tp
27 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
28 .el .TP "\\$1"
29 ..
30 .TH GROFF_FONT 5 "27 June 2001" "Groff Version 1.17.2"
31 .SH NAME
32 groff_font \- format of groff device and font description files
33 .SH DESCRIPTION
34 The groff font format is roughly a superset of the ditroff
35 font format.
36 Unlike the ditroff font format, there is no associated binary
37 format.
38 The font files for device
39 .I name
40 are stored in a directory
41 .BI dev name.
42 There are two types of file: a
43 device description file called
44 .B DESC
45 and for each font
46 .I F
47 a font file called
48 .IR F .
49 These are text files;
50 there is no associated binary format.
51 .SS DESC file format
52 The DESC file can contain the following types of line:
53 .TP
54 .BI res\  n
55 There are
56 .I n
57 machine units per inch.
58 .TP
59 .BI hor\  n
60 The horizontal resolution is
61 .I n
62 machine units.
63 .TP
64 .BI vert\  n
65 The vertical resolution is
66 .I n
67 machine units.
68 .TP
69 .BI sizescale\  n
70 The scale factor for pointsizes.
71 By default this has a value of 1.
72 One
73 .I
74 scaled point
75 is equal to
76 one
77 .RI point/ n .
78 The arguments to the
79 .B unitwidth
80 and
81 .B sizes
82 commands are given in scaled points.
83 .TP
84 .BI unitwidth\  n
85 Quantities in the font files are given in machine units
86 for fonts whose point size is
87 .I n 
88 scaled points.
89 .TP
90 .BI prepro\  program
91 Call
92 .I program
93 as a preprocessor.
94 .TP
95 .BI postpro\  program
96 Use
97 .I program
98 as the postprocessor.
99 .TP
100 .B tcommand
101 This means that the postprocessor can handle the
102 .B t
103 and
104 .B u
105 output commands.
106 .TP
107 .BI sizes\  s1\ s2\|.\|.\|.\|sn\  0
108 This means that the device has fonts at
109 .IR s1 ,
110 .IR s2 ,\|.\|.\|.\| sn
111 scaled points.
112 The list of sizes must be terminated by a
113 .BR 0 .
114 Each
115 .BI s i
116 can also be a range of sizes
117 .IR m \- n .
118 The list can extend over more than one line.
119 .TP
120 .BI styles\  S1\ S2\|.\|.\|.\|Sm
121 The first
122 .I m
123 font positions will be associated with styles
124 .IR S1\|.\|.\|.\|Sm .
125 .TP
126 .BI fonts\  n\ F1\ F2\ F3\|.\|.\|.\|Fn
127 Fonts
128 .I F1\|.\|.\|.\|Fn
129 will be mounted in the font positions 
130 .IR m +1,\|.\|.\|., m + n
131 where
132 .I m
133 is the number of styles.
134 This command may extend over more than one line.
135 A font name of
136 .B 0
137 will cause no font to be mounted on the corresponding font position.
138 .TP
139 .BI family\  fam
140 The default font family is
141 .IR fam .
142 .TP
143 .B use_charnames_in_special
144 This command indicates that troff should encode named characters inside
145 special commands.
146 .TP
147 .B pass_filenames
148 requests that troff tells the driver the source file name being processed.
149 This is achieved by another tcommand:
150 .B F
151 .IR filename .
152 .TP
153 .B charset
154 This line and everything following in the file are ignored.
155 It is allowed for the sake of backwards compatibility.
156 .TP
157 .BI print\  program
158 Use
159 .I program
160 as the spooler program for printing.
161 If omitted, the
162 .B \-l
163 and
164 .B \-L
165 options of
166 .B groff
167 are ignored.
168 .LP
169 The res, unitwidth, fonts and sizes lines are compulsory.
170 Other commands are ignored by
171 .B troff
172 but may be used by postprocessors to store arbitrary information
173 about the device in the DESC file.
174 .LP
175 Here a list of obsolete keywords which are recognized by
176 .B groff
177 but completely ignored:
178 .BR spare1 ,
179 .BR spare2 ,
180 .BR biggestfont .
181 .SS Font file format
182 A font file has two sections. The first section is a sequence
183 of lines each containing a sequence of blank delimited
184 words; the first word in the line is a key, and subsequent
185 words give a value for that key.
186 .TP
187 .BI name\  F
188 The name of the font is
189 .IR F .
190 .TP
191 .BI spacewidth\  n
192 The normal width of a space is
193 .IR n .
194 .TP
195 .BI slant\  n
196 The characters of the font have a slant of
197 .I n
198 degrees. (Positive means forward.)
199 .TP
200 .BI ligatures\  lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
201 Characters
202 .IR lig1 ,
203 .IR lig2 ,\|.\|.\|., lign
204 are ligatures; possible ligatures are
205 .BR ff ,
206 .BR fi ,
207 .BR fl ,
208 .B ffi
209 and
210 .BR ffl .
211 For backwards compatibility, the list of ligatures may be terminated
212 with a
213 .BR 0.
214 The list of ligatures may not extend over more than one line.
215 .TP
216 .B special
217 The font is
218 .IR special ;
219 this means that when a character is requested that is not present in
220 the current font, it will be searched for in any special fonts that
221 are mounted.
222 .LP
223 Other commands are ignored by
224 .B troff
225 but may be used by postprocessors to store arbitrary information
226 about the font in the font file.
227 .LP
228 The first section can contain comments which start with the
229 .B #
230 character and extend to the end of a line.
231 .LP
232 The second section contains one or two subsections.
233 It must contain a
234 .I charset
235 subsection
236 and it may also contain a
237 .I kernpairs
238 subsection.
239 These subsections can appear in any order.
240 Each subsection starts with a word on a line by itself.
241 .LP
242 The word
243 .B charset
244 starts the charset subsection.
245 The
246 .B charset
247 line is followed by a sequence of lines.
248 Each line gives information for one character.
249 A line comprises a number of fields separated
250 by blanks or tabs. The format is
251 .IP
252 .I name metrics type code 
253 .RI [ entity_name ]
254 .RB [ --
255 .IR comment ]
256 .LP
257 .I name
258 identifies the character:
259 if
260 .I name
261 is a single character
262 .I c
263 then it corresponds to the groff input character
264 .IR c ;
265 if it is of the form
266 .BI \e c
267 where c is a single character, then it
268 corresponds to the groff input character
269 .BI \e c\fR;
270 otherwise it corresponds to the groff input character
271 .BI \e[ name ]
272 (if it is exactly two characters
273 .I xx
274 it can be entered as
275 .BI \e( xx\fR).
276 Groff supports eight bit characters; however some utilities
277 has difficulties with eight bit characters.
278 For this reason, there is a convention that the name
279 .BI char n
280 is equivalent to the single character whose code is
281 .I n .
282 For example,
283 .B char163
284 would be equivalent to the character with code 163
285 which is the pounds sterling sign in ISO Latin-1.
286 The name
287 .B \-\-\-
288 is special and indicates that the character is unnamed;
289 such characters can only be used by means of the
290 .B \eN
291 escape sequence in
292 .BR troff .
293 .LP
294 The
295 .I type
296 field gives the character type:
297 .TP
298 1
299 means the character has an descender, for example, p;
300 .TP
301 2
302 means the character has an ascender, for example, b;
303 .TP
304 3
305 means the character has both an ascender and a descender, for example,
306 (.
307 .LP
308 The
309 .I code
310 field gives the code which the postprocessor uses to print the character.
311 The character can also be input to groff using this code by means of the
312 .B \eN
313 escape sequence.
314 The code can be any integer.
315 If it starts with a
316 .B 0
317 it will be interpreted as octal;
318 if it starts with
319 .B 0x
320 or
321 .B 0X
322 it will be intepreted as hexadecimal.
323 .LP
324 The
325 .I entity_name
326 field gives an ascii string identifying the glyph which the postprocessor
327 uses to print the character.
328 This field is optional and has been introduced so that the html device driver
329 can encode its character set.
330 For example, the character `\e[Po]' is represented as `£' in html 4.0.
331 .LP
332 Anything on the line after the encoding field resp. after `-\&-' will
333 be ignored.
334 .LP
335 The
336 .I metrics
337 field has the form:
338 .IP
339 .IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \
340 left_italic_correction [\fB, subscript_correction ]]]]]
341 .LP
342 There must not be any spaces between these subfields.
343 Missing subfields are assumed to be 0.
344 The subfields are all decimal integers.
345 Since there is no associated binary format, these
346 values are not required to fit into a variable of type
347 .B char
348 as they are in ditroff.
349 The
350 .I width
351 subfields gives the width of the character.
352 The
353 .I height
354 subfield gives the height of the character (upwards is positive);
355 if a character does not extend above the baseline, it should be
356 given a zero height, rather than a negative height.
357 The
358 .I depth
359 subfield gives the depth of the character, that is, the distance
360 below the lowest point below the baseline to which the
361 character extends (downwards is positive);
362 if a character does not extend below above the baseline, it should be
363 given a zero depth, rather than a negative depth.
364 The
365 .I italic_correction
366 subfield gives the amount of space that should be added after the
367 character when it is immediately to be followed by a character
368 from a roman font.
369 The
370 .I left_italic_correction
371 subfield gives the amount of space that should be added before the
372 character when it is immediately to be preceded by a character
373 from a roman font.
374 The
375 .I subscript_correction
376 gives the amount of space that should be added after a character
377 before adding a subscript.
378 This should be less than the italic correction.
379 .LP
380 A line in the charset section can also have the format
381 .IP
382 .I
383 name \fB"
384 .LP
385 This indicates that
386 .I name
387 is just another name for the character mentioned in the
388 preceding line.
389 .LP
390 The word
391 .B kernpairs
392 starts the kernpairs section.
393 This contains a sequence of lines of the form:
394 .IP
395 .I
396 c1 c2 n
397 .LP
398 This means that when character
399 .I c1
400 appears next to character
401 .I c2
402 the space between them should be increased by
403 .IR n .
404 Most entries in kernpairs section will have a negative value for
405 .IR n .
406 .SH FILES
407 .Tp \w'/usr/share/groff/1.17.2/font/devname/DESC'u+3n
408 .BI /usr/share/groff/1.17.2/font/dev name /DESC
409 Device description file for device
410 .IR name .
411 .TP
412 .BI /usr/share/groff/1.17.2/font/dev name / F
413 Font file for font
414 .I F
415 of device
416 .IR name .
417 .SH "SEE ALSO"
418 .BR groff_out (5),
419 .BR troff (1).
420 .
421 .\" Local Variables:
422 .\" mode: nroff
423 .\" End: