2 Copyright (C) 1989-1995, 2001, 2002, 2003 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
20 .do nr groff_font_C \n[.C]
29 .\" Like TP, but if specified indent is more than half
30 .\" the current line-length - indent, use the default indent.
32 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
37 .TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
41 groff_font \- format of groff device and font description files
45 The groff font format is roughly a superset of the ditroff
48 The font files for device
50 are stored in a directory
53 There are two types of file: a
54 device description file called
62 unlike the ditroff font format,
63 there is no associated binary format.
68 The DESC file can contain the following types of line as shown below.
70 Later entries in the file override previous values.
74 This line and everything following in the file are ignored.
76 It is allowed for the sake of backwards compatibility.
80 The default font family is
84 .BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn
87 will be mounted in the font positions
88 .IR m +1,\|.\|.\|., m + n
91 is the number of styles.
93 This command may extend over more than one line.
97 will cause no font to be mounted on the corresponding font position.
101 The horizontal resolution is
107 The physical vertical dimension of the output medium in machine units.
111 itself but by output devices.
120 .BI papersize\ string
125 are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
126 types letter, legal, tabloid, ledger, statement, executive, com10, and
129 Case is not significant for
131 if it holds predefined paper types.
135 can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
137 reads the first line and tests for the above paper sizes.
141 can be a custom paper size in the format
143 (no spaces before and after the comma).
149 must have a unit appended; valid values are `i' for inches, `c' for
150 centimeters, `p' for points, and `P' for picas.
155 An argument which starts with a digit is always treated as a custom paper
159 sets both the vertical and horizontal dimension of the output medium.
162 More than one argument can be specified;
164 scans from left to right and uses the first valid paper specification.
168 The physical horizontal dimension of the output medium in machine units.
178 itself but by output devices.
182 Make troff tell the driver the source file name being processed.
184 This is achieved by another tcommand:
192 as the postprocessor.
204 as the spooler program for printing.
218 machine units per inch.
221 .BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
222 This means that the device has fonts at
224 .IR s2 ,\|.\|.\|.\| sn
227 The list of sizes must be terminated by a
232 can also be a range of sizes
235 The list can extend over more than one line.
239 The scale factor for pointsizes.
241 By default this has a value of 1.
254 commands are given in scaled points.
257 .BI styles\ S1\ S2\|.\|.\|.\|Sm
260 font positions will be associated with styles
261 .IR S1\|.\|.\|.\|Sm .
265 This means that the postprocessor can handle the
273 Quantities in the font files are given in machine units
274 for fonts whose point size is
279 .B use_charnames_in_special
280 This command indicates that troff should encode named characters inside
285 The vertical resolution is
296 lines are compulsory.
298 Not all commands in the DESC file are used by
300 itself; some of the keywords (or even additional ones) are used by
301 postprocessors to store arbitrary information about the device.
304 Here a list of obsolete keywords which are recognized by
306 but completely ignored:
314 A font file has two sections.
315 The first section is a sequence
316 of lines each containing a sequence of blank delimited
317 words; the first word in the line is a key, and subsequent
318 words give a value for that key.
321 .BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
324 .IR lig2 ,\ \|.\|.\|.,\ lign
325 are ligatures; possible ligatures are
333 For backwards compatibility, the list of ligatures may be terminated
337 The list of ligatures may not extend over more than one line.
341 The name of the font is
346 The characters of the font have a slant of
350 (Positive means forward.)
354 The normal width of a space is
361 this means that when a character is requested that is not present in
362 the current font, it will be searched for in any special fonts that
366 Other commands are ignored by
368 but may be used by postprocessors to store arbitrary information
369 about the font in the font file.
372 The first section can contain comments which start with the
374 character and extend to the end of a line.
377 The second section contains one or two subsections.
382 and it may also contain a
386 These subsections can appear in any order.
388 Each subsection starts with a word on a line by itself.
393 starts the charset subsection.
397 line is followed by a sequence of lines.
399 Each line gives information for one character.
401 A line comprises a number of fields separated
407 .I name metrics type code
414 identifies the character:
417 is a single character
419 then it corresponds to the groff input character
423 where c is a single character, then it
424 corresponds to the special character
426 otherwise it corresponds to the groff input character
427 .BI \[rs][ name ]\fR.
429 If it is exactly two characters
434 Note that single-letter special characters can't be accessed as
436 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
440 is special and indicates that the character is unnamed;
441 such characters can only be used by means of the
447 Groff supports eight-bit characters; however some utilities
448 have difficulties with eight-bit characters.
450 For this reason, there is a convention that the name
452 is equivalent to the single character whose code is
457 would be equivalent to the character with code 163
458 which is the pounds sterling sign in ISO Latin-1.
463 field gives the character type:
467 means the character has a descender, for example, p;
471 means the character has an ascender, for example, b;
475 means the character has both an ascender and a descender, for example,
481 field gives the code which the postprocessor uses to print the character.
483 The character can also be input to groff using this code by means of the
487 The code can be any integer.
491 it will be interpreted as octal;
496 it will be intepreted as hexadecimal.
498 Note, however, that the
500 escape sequence only accepts a decimal integer.
505 field gives an ascii string identifying the glyph which the postprocessor
506 uses to print the character.
508 This field is optional and has been introduced so that the html device driver
509 can encode its character set.
511 For example, the character `\[rs][Po]' is represented as `£' in
515 Anything on the line after the encoding field resp. after `-\&-' will
521 field has the form (in one line; it is broken here for the sake of
525 .IR width [\fB, height [\fB, depth [\fB, italic-correction
527 .RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]]
530 There must not be any spaces between these subfields.
532 Missing subfields are assumed to be 0.
534 The subfields are all decimal integers.
536 Since there is no associated binary format, these
537 values are not required to fit into a variable of type
539 as they are in ditroff.
543 subfields gives the width of the character.
547 subfield gives the height of the character (upwards is positive);
548 if a character does not extend above the baseline, it should be
549 given a zero height, rather than a negative height.
553 subfield gives the depth of the character, that is, the distance
554 below the lowest point below the baseline to which the
555 character extends (downwards is positive);
556 if a character does not extend below above the baseline, it should be
557 given a zero depth, rather than a negative depth.
561 subfield gives the amount of space that should be added after the
562 character when it is immediately to be followed by a character
566 .I left-italic-correction
567 subfield gives the amount of space that should be added before the
568 character when it is immediately to be preceded by a character
572 .I subscript-correction
573 gives the amount of space that should be added after a character
574 before adding a subscript.
576 This should be less than the italic correction.
579 A line in the charset section can also have the format
588 is just another name for the character mentioned in the
594 starts the kernpairs section.
596 This contains a sequence of lines of the form:
602 This means that when character
604 appears next to character
606 the space between them should be increased by
609 Most entries in kernpairs section will have a negative value for
615 .Tp \w'@FONTDIR@/devname/DESC'u+3n
616 .BI @FONTDIR@/dev name /DESC
617 Device description file for device
621 .BI @FONTDIR@/dev name / F
630 .BR groff_out (@MAN5EXT@),
631 .BR @g@troff (@MAN1EXT@).