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
26 .\" Like TP, but if specified indent is more than half
27 .\" the current line-length - indent, use the default indent.
29 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
34 .TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
38 groff_font \- format of groff device and font description files
42 The groff font format is roughly a superset of the ditroff
45 The font files for device
47 are stored in a directory
50 There are two types of file: a
51 device description file called
59 unlike the ditroff font format,
60 there is no associated binary format.
65 The DESC file can contain the following types of line as shown below.
67 Later entries in the file override previous values.
71 This line and everything following in the file are ignored.
73 It is allowed for the sake of backwards compatibility.
77 The default font family is
81 .BI fonts\ n\ F1\ F2\ F3\|.\|.\|.\|Fn
84 will be mounted in the font positions
85 .IR m +1,\|.\|.\|., m + n
88 is the number of styles.
90 This command may extend over more than one line.
94 will cause no font to be mounted on the corresponding font position.
98 The horizontal resolution is
104 The physical vertical dimension of the output medium in machine units.
108 itself; currently, only
114 The physical horizontal dimension of the output medium in machine units.
121 output device uses it.
124 .BI papersize\ string
129 are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
130 types letter, legal, tabloid, ledger, statement, executive, com10, and
133 Case is not significant for
135 if it holds predefined paper types.
139 can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
141 reads the first line and tests for the above paper sizes.
145 can be a custom paper size in the format
147 (no spaces before and after the comma).
153 must have a unit appended; valid values are `i' for inches, `c' for
154 centimeters, `p' for points, and `P' for picas.
159 An argument which starts with a digit is always treated as a custom paper
163 sets both the vertical and horizontal dimension of the output medium.
166 More than one argument can be specified;
168 scans from left to right and uses the first valid paper specification.
173 Make troff tell the driver the source file name being processed.
175 This is achieved by another tcommand:
183 as the postprocessor.
195 as the spooler program for printing.
209 machine units per inch.
212 .BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
213 This means that the device has fonts at
215 .IR s2 ,\|.\|.\|.\| sn
218 The list of sizes must be terminated by a
223 can also be a range of sizes
226 The list can extend over more than one line.
230 The scale factor for pointsizes.
232 By default this has a value of 1.
245 commands are given in scaled points.
248 .BI styles\ S1\ S2\|.\|.\|.\|Sm
251 font positions will be associated with styles
252 .IR S1\|.\|.\|.\|Sm .
256 This means that the postprocessor can handle the
264 Quantities in the font files are given in machine units
265 for fonts whose point size is
270 .B use_charnames_in_special
271 This command indicates that troff should encode named characters inside
276 The vertical resolution is
287 lines are compulsory.
289 Other commands are ignored by
291 but may be used by postprocessors to store arbitrary information
292 about the device in the DESC file.
295 Here a list of obsolete keywords which are recognized by
297 but completely ignored:
305 A font file has two sections.
306 The first section is a sequence
307 of lines each containing a sequence of blank delimited
308 words; the first word in the line is a key, and subsequent
309 words give a value for that key.
312 .BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
315 .IR lig2 ,\ \|.\|.\|.,\ lign
316 are ligatures; possible ligatures are
324 For backwards compatibility, the list of ligatures may be terminated
328 The list of ligatures may not extend over more than one line.
332 The name of the font is
337 The characters of the font have a slant of
341 (Positive means forward.)
345 The normal width of a space is
352 this means that when a character is requested that is not present in
353 the current font, it will be searched for in any special fonts that
357 Other commands are ignored by
359 but may be used by postprocessors to store arbitrary information
360 about the font in the font file.
363 The first section can contain comments which start with the
365 character and extend to the end of a line.
368 The second section contains one or two subsections.
373 and it may also contain a
377 These subsections can appear in any order.
379 Each subsection starts with a word on a line by itself.
384 starts the charset subsection.
388 line is followed by a sequence of lines.
390 Each line gives information for one character.
392 A line comprises a number of fields separated
398 .I name metrics type code
405 identifies the character:
408 is a single character
410 then it corresponds to the groff input character
414 where c is a single character, then it
415 corresponds to the special character
417 otherwise it corresponds to the groff input character
418 .BI \[rs][ name ]\fR.
420 If it is exactly two characters
425 Note that single-letter special characters can't be accessed as
427 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
431 is special and indicates that the character is unnamed;
432 such characters can only be used by means of the
438 Groff supports eight-bit characters; however some utilities
439 have difficulties with eight-bit characters.
441 For this reason, there is a convention that the name
443 is equivalent to the single character whose code is
448 would be equivalent to the character with code 163
449 which is the pounds sterling sign in ISO Latin-1.
454 field gives the character type:
458 means the character has a descender, for example, p;
462 means the character has an ascender, for example, b;
466 means the character has both an ascender and a descender, for example,
472 field gives the code which the postprocessor uses to print the character.
474 The character can also be input to groff using this code by means of the
478 The code can be any integer.
482 it will be interpreted as octal;
487 it will be intepreted as hexadecimal.
489 Note, however, that the
491 escape sequence only accepts a decimal integer.
496 field gives an ascii string identifying the glyph which the postprocessor
497 uses to print the character.
499 This field is optional and has been introduced so that the html device driver
500 can encode its character set.
502 For example, the character `\[rs][Po]' is represented as `£' in
506 Anything on the line after the encoding field resp. after `-\&-' will
512 field has the form (in one line; it is broken here for the sake of
516 .IR width [\fB, height [\fB, depth [\fB, italic-correction
518 .RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]]
521 There must not be any spaces between these subfields.
523 Missing subfields are assumed to be 0.
525 The subfields are all decimal integers.
527 Since there is no associated binary format, these
528 values are not required to fit into a variable of type
530 as they are in ditroff.
534 subfields gives the width of the character.
538 subfield gives the height of the character (upwards is positive);
539 if a character does not extend above the baseline, it should be
540 given a zero height, rather than a negative height.
544 subfield gives the depth of the character, that is, the distance
545 below the lowest point below the baseline to which the
546 character extends (downwards is positive);
547 if a character does not extend below above the baseline, it should be
548 given a zero depth, rather than a negative depth.
552 subfield gives the amount of space that should be added after the
553 character when it is immediately to be followed by a character
557 .I left-italic-correction
558 subfield gives the amount of space that should be added before the
559 character when it is immediately to be preceded by a character
563 .I subscript-correction
564 gives the amount of space that should be added after a character
565 before adding a subscript.
567 This should be less than the italic correction.
570 A line in the charset section can also have the format
579 is just another name for the character mentioned in the
585 starts the kernpairs section.
587 This contains a sequence of lines of the form:
593 This means that when character
595 appears next to character
597 the space between them should be increased by
600 Most entries in kernpairs section will have a negative value for
606 .Tp \w'@FONTDIR@/devname/DESC'u+3n
607 .BI @FONTDIR@/dev name /DESC
608 Device description file for device
612 .BI @FONTDIR@/dev name / F
621 .BR groff_out (@MAN5EXT@),
622 .BR @g@troff (@MAN1EXT@).