2 Copyright (C) 1989-1995, 2001 Free Software Foundation, Inc.
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.
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.
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
24 .\" Like TP, but if specified indent is more than half
25 .\" the current line-length - indent, use the default indent.
27 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
30 .TH GROFF_FONT 5 "27 June 2001" "Groff Version 1.17.2"
32 groff_font \- format of groff device and font description files
34 The groff font format is roughly a superset of the ditroff
36 Unlike the ditroff font format, there is no associated binary
38 The font files for device
40 are stored in a directory
42 There are two types of file: a
43 device description file called
50 there is no associated binary format.
52 The DESC file can contain the following types of line:
57 machine units per inch.
60 The horizontal resolution is
65 The vertical resolution is
70 The scale factor for pointsizes.
71 By default this has a value of 1.
82 commands are given in scaled points.
85 Quantities in the font files are given in machine units
86 for fonts whose point size is
101 This means that the postprocessor can handle the
107 .BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
108 This means that the device has fonts at
110 .IR s2 ,\|.\|.\|.\| sn
112 The list of sizes must be terminated by a
116 can also be a range of sizes
118 The list can extend over more than one line.
120 .BI styles\ S1\ S2\|.\|.\|.\|Sm
123 font positions will be associated with styles
124 .IR S1\|.\|.\|.\|Sm .
126 .BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn
129 will be mounted in the font positions
130 .IR m +1,\|.\|.\|., m + n
133 is the number of styles.
134 This command may extend over more than one line.
137 will cause no font to be mounted on the corresponding font position.
140 The default font family is
143 .B use_charnames_in_special
144 This command indicates that troff should encode named characters inside
148 requests that troff tells the driver the source file name being processed.
149 This is achieved by another tcommand:
154 This line and everything following in the file are ignored.
155 It is allowed for the sake of backwards compatibility.
160 as the spooler program for printing.
169 The res, unitwidth, fonts and sizes lines are compulsory.
170 Other commands are ignored by
172 but may be used by postprocessors to store arbitrary information
173 about the device in the DESC file.
175 Here a list of obsolete keywords which are recognized by
177 but completely ignored:
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.
188 The name of the font is
192 The normal width of a space is
196 The characters of the font have a slant of
198 degrees. (Positive means forward.)
200 .BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
203 .IR lig2 ,\|.\|.\|., lign
204 are ligatures; possible ligatures are
211 For backwards compatibility, the list of ligatures may be terminated
214 The list of ligatures may not extend over more than one line.
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
223 Other commands are ignored by
225 but may be used by postprocessors to store arbitrary information
226 about the font in the font file.
228 The first section can contain comments which start with the
230 character and extend to the end of a line.
232 The second section contains one or two subsections.
236 and it may also contain a
239 These subsections can appear in any order.
240 Each subsection starts with a word on a line by itself.
244 starts the charset subsection.
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
252 .I name metrics type code
258 identifies the character:
261 is a single character
263 then it corresponds to the groff input character
267 where c is a single character, then it
268 corresponds to the groff input character
270 otherwise it corresponds to the groff input character
272 (if it is exactly two characters
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
280 is equivalent to the single character whose code is
284 would be equivalent to the character with code 163
285 which is the pounds sterling sign in ISO Latin-1.
288 is special and indicates that the character is unnamed;
289 such characters can only be used by means of the
296 field gives the character type:
299 means the character has an descender, for example, p;
302 means the character has an ascender, for example, b;
305 means the character has both an ascender and a descender, for example,
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
314 The code can be any integer.
317 it will be interpreted as octal;
322 it will be intepreted as hexadecimal.
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.
332 Anything on the line after the encoding field resp. after `-\&-' will
339 .IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \
340 left_italic_correction [\fB, subscript_correction ]]]]]
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
348 as they are in ditroff.
351 subfields gives the width of the character.
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.
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.
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
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
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.
380 A line in the charset section can also have the format
387 is just another name for the character mentioned in the
392 starts the kernpairs section.
393 This contains a sequence of lines of the form:
398 This means that when character
400 appears next to character
402 the space between them should be increased by
404 Most entries in kernpairs section will have a negative value for
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
412 .BI /usr/share/groff/1.17.2/font/dev name / F