2 Copyright (C) 1989-1995, 2001, 2002 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 @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
32 groff_font \- format of groff device and font description files
34 The groff font format is roughly a superset of the ditroff
36 The font files for device
38 are stored in a directory
40 There are two types of file: a
41 device description file called
48 unlike the ditroff font format,
49 there is no associated binary format.
51 The DESC file can contain the following types of line:
56 machine units per inch.
59 The horizontal resolution is
64 The vertical resolution is
69 The scale factor for pointsizes.
70 By default this has a value of 1.
81 commands are given in scaled points.
84 Quantities in the font files are given in machine units
85 for fonts whose point size is
100 This means that the postprocessor can handle the
106 .BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
107 This means that the device has fonts at
109 .IR s2 ,\|.\|.\|.\| sn
111 The list of sizes must be terminated by a
115 can also be a range of sizes
117 The list can extend over more than one line.
119 .BI styles\ S1\ S2\|.\|.\|.\|Sm
122 font positions will be associated with styles
123 .IR S1\|.\|.\|.\|Sm .
125 .BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn
128 will be mounted in the font positions
129 .IR m +1,\|.\|.\|., m + n
132 is the number of styles.
133 This command may extend over more than one line.
136 will cause no font to be mounted on the corresponding font position.
139 The default font family is
142 .B use_charnames_in_special
143 This command indicates that troff should encode named characters inside
147 requests that troff tells the driver the source file name being processed.
148 This is achieved by another tcommand:
153 This line and everything following in the file are ignored.
154 It is allowed for the sake of backwards compatibility.
159 as the spooler program for printing.
168 The res, unitwidth, fonts and sizes lines are compulsory.
169 Other commands are ignored by
171 but may be used by postprocessors to store arbitrary information
172 about the device in the DESC file.
174 Here a list of obsolete keywords which are recognized by
176 but completely ignored:
181 A font file has two sections. The first section is a sequence
182 of lines each containing a sequence of blank delimited
183 words; the first word in the line is a key, and subsequent
184 words give a value for that key.
187 The name of the font is
191 The normal width of a space is
195 The characters of the font have a slant of
197 degrees. (Positive means forward.)
199 .BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
202 .IR lig2 ,\|.\|.\|., lign
203 are ligatures; possible ligatures are
210 For backwards compatibility, the list of ligatures may be terminated
213 The list of ligatures may not extend over more than one line.
218 this means that when a character is requested that is not present in
219 the current font, it will be searched for in any special fonts that
222 Other commands are ignored by
224 but may be used by postprocessors to store arbitrary information
225 about the font in the font file.
227 The first section can contain comments which start with the
229 character and extend to the end of a line.
231 The second section contains one or two subsections.
235 and it may also contain a
238 These subsections can appear in any order.
239 Each subsection starts with a word on a line by itself.
243 starts the charset subsection.
246 line is followed by a sequence of lines.
247 Each line gives information for one character.
248 A line comprises a number of fields separated
249 by blanks or tabs. The format is
251 .I name metrics type code
257 identifies the character:
260 is a single character
262 then it corresponds to the groff input character
266 where c is a single character, then it
267 corresponds to the special character
269 otherwise it corresponds to the groff input character
270 .BI \[rs][ name ]\fR.
271 If it is exactly two characters
275 Note that single-letter special characters can't be accessed as
277 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
279 Groff supports eight-bit characters; however some utilities
280 have difficulties with eight-bit characters.
281 For this reason, there is a convention that the name
283 is equivalent to the single character whose code is
287 would be equivalent to the character with code 163
288 which is the pounds sterling sign in ISO Latin-1.
291 is special and indicates that the character is unnamed;
292 such characters can only be used by means of the
299 field gives the character type:
302 means the character has a descender, for example, p;
305 means the character has an ascender, for example, b;
308 means the character has both an ascender and a descender, for example,
313 field gives the code which the postprocessor uses to print the character.
314 The character can also be input to groff using this code by means of the
317 The code can be any integer.
320 it will be interpreted as octal;
325 it will be intepreted as hexadecimal.
329 field gives an ascii string identifying the glyph which the postprocessor
330 uses to print the character.
331 This field is optional and has been introduced so that the html device driver
332 can encode its character set.
333 For example, the character `\[rs][Po]' is represented as `£' in
336 Anything on the line after the encoding field resp. after `-\&-' will
343 .IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \
344 left_italic_correction [\fB, subscript_correction ]]]]]
346 There must not be any spaces between these subfields.
347 Missing subfields are assumed to be 0.
348 The subfields are all decimal integers.
349 Since there is no associated binary format, these
350 values are not required to fit into a variable of type
352 as they are in ditroff.
355 subfields gives the width of the character.
358 subfield gives the height of the character (upwards is positive);
359 if a character does not extend above the baseline, it should be
360 given a zero height, rather than a negative height.
363 subfield gives the depth of the character, that is, the distance
364 below the lowest point below the baseline to which the
365 character extends (downwards is positive);
366 if a character does not extend below above the baseline, it should be
367 given a zero depth, rather than a negative depth.
370 subfield gives the amount of space that should be added after the
371 character when it is immediately to be followed by a character
374 .I left_italic_correction
375 subfield gives the amount of space that should be added before the
376 character when it is immediately to be preceded by a character
379 .I subscript_correction
380 gives the amount of space that should be added after a character
381 before adding a subscript.
382 This should be less than the italic correction.
384 A line in the charset section can also have the format
391 is just another name for the character mentioned in the
396 starts the kernpairs section.
397 This contains a sequence of lines of the form:
402 This means that when character
404 appears next to character
406 the space between them should be increased by
408 Most entries in kernpairs section will have a negative value for
411 .Tp \w'@FONTDIR@/devname/DESC'u+3n
412 .BI @FONTDIR@/dev name /DESC
413 Device description file for device
416 .BI @FONTDIR@/dev name / F
422 .BR groff_out (@MAN5EXT@),
423 .BR @g@troff (@MAN1EXT@).