2 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2006, 2007
3 Free Software Foundation, Inc.
5 Permission is granted to make and distribute verbatim copies of
6 this manual provided the copyright notice and this permission notice
7 are preserved on all copies.
9 Permission is granted to copy and distribute modified versions of this
10 manual under the conditions for verbatim copying, provided that the
11 entire resulting derived work is distributed under the terms of a
12 permission notice identical to this one.
14 Permission is granted to copy and distribute translations of this
15 manual into another language, under the above conditions for modified
16 versions, except that this permission notice may be included in
17 translations approved by the Free Software Foundation instead of in
21 .do nr groff_font_C \n[.C]
30 .\" Like TP, but if specified indent is more than half
31 .\" the current line-length - indent, use the default indent.
33 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
38 .TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
42 groff_font \- format of groff device and font description files
46 The groff font format is roughly a superset of the ditroff
49 The font files for device
51 are stored in a directory
55 There are two types of file: a
56 device description file called
64 unlike the ditroff font format,
65 there is no associated binary format.
70 The DESC file can contain the following types of line as shown below.
72 Later entries in the file override previous values.
75 Empty lines are ignored.
79 This line and everything following in the file are ignored.
81 It is allowed for the sake of backwards compatibility.
85 The default font family is
89 .BI fonts\ n\ F1\ F2\ F3\ \|.\|.\|.\|\ Fn
91 .IR F1 ,\ \|.\|.\|.,\ Fn
92 are mounted in the font positions
93 .IR m +1,\ \|.\|.\|.,\ m + n
96 is the number of styles.
98 This command may extend over more than one line.
102 causes no font to be mounted on the corresponding font position.
106 The horizontal resolution is
111 .BI image_generator\ string
116 It specifies the program to generate PNG images from
119 Under GNU/Linux this is usually
121 but under other systems (notably cygwin) it might be set to another name.
125 The physical vertical dimension of the output medium in machine units.
129 itself but by output devices.
138 .BI papersize\ string
143 are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
144 types letter, legal, tabloid, ledger, statement, executive, com10, and
147 Case is not significant for
149 if it holds predefined paper types.
153 can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
155 reads the first line and tests for the above paper sizes.
159 can be a custom paper size in the format
161 (no spaces before and after the comma).
167 must have a unit appended; valid values are `i' for inches, `c' for
168 centimeters, `p' for points, and `P' for picas.
173 An argument which starts with a digit is always treated as a custom paper
177 sets both the vertical and horizontal dimension of the output medium.
180 More than one argument can be specified;
182 scans from left to right and uses the first valid paper specification.
186 The physical horizontal dimension of the output medium in machine units.
196 itself but by output devices.
200 Make troff tell the driver the source file name being processed.
202 This is achieved by another tcommand:
210 as the postprocessor.
222 as the spooler program for printing.
236 machine units per inch.
239 .BI sizes\ s1\ s2\ \|.\|.\|.\|\ sn\ 0
240 This means that the device has fonts at
242 .IR s2 ,\ \|.\|.\|.,\ sn
245 The list of sizes must be terminated by a
250 can also be a range of sizes
253 The list can extend over more than one line.
257 The scale factor for pointsizes.
259 By default this has a value of 1.
272 commands are given in scaled points.
275 .BI styles\ S1\ S2\ \|.\|.\|.\|\ Sm
278 font positions are associated with styles
279 .IR S1 ,\ \|.\|.\|.,\ Sm .
283 This means that the postprocessor can handle the
291 Indicate that the output device supports the complete Unicode
294 Useful only for devices which produce
295 .I character entities
303 section is required in the font description files since the Unicode
308 However, if there are entries in a
310 section, they either override the default mappings for those
311 particular characters or add new mappings (normally for composite
322 Quantities in the font files are given in machine units
323 for fonts whose point size is
328 .B unscaled_charwidths
329 Make the font handling module always return unscaled character widths.
336 .B use_charnames_in_special
337 This command indicates that troff should encode named characters inside
342 The vertical resolution is
353 lines are compulsory.
355 Not all commands in the DESC file are used by
357 itself; some of the keywords (or even additional ones) are used by
358 postprocessors to store arbitrary information about the device.
361 Here a list of obsolete keywords which are recognized by
363 but completely ignored:
371 A font file has two sections;
372 empty lines are ignored in both of them.
375 The first section is a sequence
376 of lines each containing a sequence of blank delimited
377 words; the first word in the line is a key, and subsequent
378 words give a value for that key.
381 .BI ligatures\ lig1\ lig2\ \|.\|.\|.\|\ lign\ \fR[ 0 \fR]
384 .IR lig2 ,\ \|.\|.\|.,\ lign
385 are ligatures; possible ligatures are
393 For backwards compatibility, the list of ligatures may be terminated
397 The list of ligatures may not extend over more than one line.
401 The name of the font is
406 The characters of the font have a slant of
410 (Positive means forward.)
414 The normal width of a space is
421 this means that when a character is requested that is not present in
422 the current font, it is searched for in any special fonts that are mounted.
425 Other commands are ignored by
427 but may be used by postprocessors to store arbitrary information
428 about the font in the font file.
431 The first section can contain comments which start with the
433 character and extend to the end of a line.
436 The second section contains one or two subsections.
441 and it may also contain a
445 These subsections can appear in any order.
447 Each subsection starts with a word on a line by itself.
452 starts the charset subsection.
456 line is followed by a sequence of lines.
458 Each line gives information for one character.
460 A line comprises a number of fields separated
466 .I name metrics type code
473 identifies the character:
476 is a single character
478 then it corresponds to the groff input character
482 where c is a single character, then it
483 corresponds to the special character
485 otherwise it corresponds to the groff input character
486 .BI \[rs][ name ]\fR.
488 If it is exactly two characters
493 Note that single-letter special characters can't be accessed as
495 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
499 is special and indicates that the character is unnamed;
500 such characters can only be used by means of the
506 Groff supports eight-bit characters; however some utilities
507 have difficulties with eight-bit characters.
509 For this reason, there is a convention that the name
511 is equivalent to the single character whose code is
516 would be equivalent to the character with code 163
517 which is the pounds sterling sign in ISO Latin-1.
522 field gives the character type:
526 means the character has a descender, for example, p;
530 means the character has an ascender, for example, b;
534 means the character has both an ascender and a descender, for example,
540 field gives the code which the postprocessor uses to print the character.
542 The character can also be input to groff using this code by means of the
546 The code can be any integer.
550 it is interpreted as octal;
555 it is intepreted as hexadecimal.
557 Note, however, that the
559 escape sequence only accepts a decimal integer.
564 field gives an ascii string identifying the glyph which the postprocessor
565 uses to print the character.
567 This field is optional and is currently used by
569 to build sub-encoding arrays for PS fonts containing more than 256 glyphs.
571 (It has also been used for
573 entity names but for efficiency reasons this data is now compiled directly
578 Anything on the line after the encoding field or `-\&-' are ignored.
583 field has the form (in one line; it is broken here for the sake of
590 .RI [\fB, italic-correction
592 .RI [\fB, left-italic-correction\c
593 .RI [\fB, subscript-correction ]]]]]
596 There must not be any spaces between these subfields.
598 Missing subfields are assumed to be 0.
600 The subfields are all decimal integers.
602 Since there is no associated binary format, these
603 values are not required to fit into a variable of type
605 as they are in ditroff.
609 subfields gives the width of the character.
613 subfield gives the height of the character (upwards is positive);
614 if a character does not extend above the baseline, it should be
615 given a zero height, rather than a negative height.
619 subfield gives the depth of the character, that is, the distance
620 below the lowest point below the baseline to which the
621 character extends (downwards is positive);
622 if a character does not extend below above the baseline, it should be
623 given a zero depth, rather than a negative depth.
627 subfield gives the amount of space that should be added after the
628 character when it is immediately to be followed by a character
632 .I left-italic-correction
633 subfield gives the amount of space that should be added before the
634 character when it is immediately to be preceded by a character
638 .I subscript-correction
639 gives the amount of space that should be added after a character
640 before adding a subscript.
642 This should be less than the italic correction.
645 A line in the charset section can also have the format
654 is just another name for the character mentioned in the
660 starts the kernpairs section.
662 This contains a sequence of lines of the form:
668 This means that when character
670 appears next to character
672 the space between them should be increased by
675 Most entries in kernpairs section have a negative value for
681 .Tp \w'@FONTDIR@/devname/DESC'u+3n
682 .BI @FONTDIR@/dev name /DESC
683 Device description file for device
687 .BI @FONTDIR@/dev name / F
696 .BR groff_out (@MAN5EXT@),
697 .BR @g@troff (@MAN1EXT@).