2 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004, 2006, 2007, 2008,
4 Free Software Foundation, Inc.
6 Permission is granted to make and distribute verbatim copies of
7 this manual provided the copyright notice and this permission notice
8 are preserved on all copies.
10 Permission is granted to copy and distribute modified versions of this
11 manual under the conditions for verbatim copying, provided that the
12 entire resulting derived work is distributed under the terms of a
13 permission notice identical to this one.
15 Permission is granted to copy and distribute translations of this
16 manual into another language, under the above conditions for modified
17 versions, except that this permission notice may be included in
18 translations approved by the Free Software Foundation instead of in
22 .do nr groff_font_C \n[.C]
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
51 There are two types of file: a
52 device description file called
56 a font file called\~\c
60 unlike the ditroff font format,
61 there is no associated binary format.
66 The DESC file can contain the following types of line as shown below.
68 Later entries in the file override previous values.
71 Empty lines are ignored.
75 This line and everything following in the file are ignored.
77 It is allowed for the sake of backwards compatibility.
81 The default font family is
85 .BI fonts\ n\ F1\ F2\ F3\ \|.\|.\|.\|\ Fn
87 .IR F1 ,\ \|.\|.\|.,\ Fn
88 are mounted in the font positions
89 .IR m \|+\|1,\ \|.\|.\|.,\ m \|+\| n
92 is the number of styles.
94 This command may extend over more than one line.
98 causes no font to be mounted on the corresponding font position.
102 The horizontal resolution is
107 .BI image_generator\ string
112 It specifies the program to generate PNG images from
115 Under GNU/Linux this is usually
117 but under other systems (notably cygwin) it might be set to another name.
121 The physical vertical dimension of the output medium in machine units.
125 itself but by output devices.
134 .BI papersize\ string
139 are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
140 types letter, legal, tabloid, ledger, statement, executive, com10, and
143 Case is not significant for
145 if it holds predefined paper types.
149 can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
151 reads the first line and tests for the above paper sizes.
155 can be a custom paper size in the format
157 (no spaces before and after the comma).
163 must have a unit appended; valid values are `i' for inches, `c' for
164 centimeters, `p' for points, and `P' for picas.
169 An argument which starts with a digit is always treated as a custom paper
173 sets both the vertical and horizontal dimension of the output medium.
176 More than one argument can be specified;
178 scans from left to right and uses the first valid paper specification.
182 The physical horizontal dimension of the output medium in machine units.
192 itself but by output devices.
196 Make troff tell the driver the source file name being processed.
198 This is achieved by another tcommand:
206 as the postprocessor.
218 as the spooler program for printing.
232 machine units per inch.
235 .BI sizes\ s1\ s2\ \|.\|.\|.\|\ sn\ 0
236 This means that the device has fonts at
238 .IR s2 ,\ \|.\|.\|.,\ sn
241 The list of sizes must be terminated by a
246 can also be a range of sizes
249 The list can extend over more than one line.
253 The scale factor for point sizes.
255 By default this has a value of 1.
268 commands are given in scaled points.
271 .BI styles\ S1\ S2\ \|.\|.\|.\|\ Sm
274 font positions are associated with styles
275 .IR S1 ,\ \|.\|.\|.,\ Sm .
279 This means that the postprocessor can handle the
287 Indicate that the output device supports the complete Unicode
290 Useful only for devices which produce
291 .I character entities
299 section is required in the font description files since the Unicode
304 However, if there are entries in a
306 section, they either override the default mappings for those
307 particular characters or add new mappings (normally for composite
319 Quantities in the font files are given in machine units
320 for fonts whose point size is
325 .B unscaled_charwidths
326 Make the font handling module always return unscaled glyph widths.
333 .B use_charnames_in_special
334 This command indicates that troff should encode named glyphs inside
339 The vertical resolution is
350 lines are compulsory.
352 Not all commands in the DESC file are used by
354 itself; some of the keywords (or even additional ones) are used by
355 postprocessors to store arbitrary information about the device.
358 Here a list of obsolete keywords which are recognized by
360 but completely ignored:
368 A font file has two sections;
369 empty lines are ignored in both of them.
372 The first section is a sequence
373 of lines each containing a sequence of blank delimited
374 words; the first word in the line is a key, and subsequent
375 words give a value for that key.
378 .BI ligatures\ lig1\ lig2\ \|.\|.\|.\|\ lign\ \fR[ 0 \fR]
381 .IR lig2 ,\ \|.\|.\|.,\ lign
382 are ligatures; possible ligatures are
390 For backwards compatibility, the list of ligatures may be terminated
394 The list of ligatures may not extend over more than one line.
398 The name of the font is\~\c
403 The glyphs of the font have a slant of
407 (Positive means forward.)
411 The normal width of a space is\~\c
418 this means that when a glyph is requested that is not present in
419 the current font, it is searched for in any special fonts that are
423 Other commands are ignored by
425 but may be used by postprocessors to store arbitrary information
426 about the font in the font file.
429 The first section can contain comments which start with the
431 character and extend to the end of a line.
434 The second section contains one or two subsections.
439 and it may also contain a
443 These subsections can appear in any order.
445 Each subsection starts with a word on a line by itself.
450 starts the charset subsection.
454 line is followed by a sequence of lines.
456 Each line gives information for one glyph.
458 A line comprises a number of fields separated
464 .I name metrics type code
471 identifies the glyph:
476 then it corresponds to the groff input character
480 where c is a single character, then it
481 corresponds to the special character
483 otherwise it corresponds to the groff input character
484 .BI \[rs][ name ]\fR.
486 If it is exactly two characters
491 Note that single-letter special characters can't be accessed as
493 the only exception is `\[rs]\-' which is identical to `\[rs][\-]'.
497 is special and indicates that the glyph is unnamed;
498 such glyphs can only be used by means of the
506 field gives the glyph type:
510 means the glyph has a descender, for example, `p';
514 means the glyph has an ascender, for example, `b';
518 means the glyph has both an ascender and a descender, for example,
524 field gives the code which the postprocessor uses to print the glyph.
526 The glyph can also be input to groff using this code by means of the
530 The code can be any integer.
532 If it starts with a\~\c
534 it is interpreted as octal;
539 it is intepreted as hexadecimal.
541 Note, however, that the
543 escape sequence only accepts a decimal integer.
548 field gives an ASCII string identifying the glyph which the postprocessor
549 uses to print that glyph.
551 This field is optional and is currently used by
553 to build sub-encoding arrays for PS fonts containing more than 256 glyphs.
555 (It has also been used for
557 entity names but for efficiency reasons this data is now compiled directly
562 Anything on the line after the encoding field or `\-\-' are ignored.
567 field has the form (in one line; it is broken here for the sake of
574 .RI [\fB, italic-correction
576 .RI [\fB, left-italic-correction\c
577 .RI [\fB, subscript-correction ]]]]]
580 There must not be any spaces between these subfields.
582 Missing subfields are assumed to be\~0.
584 The subfields are all decimal integers.
586 Since there is no associated binary format, these
587 values are not required to fit into a variable of type
589 as they are in ditroff.
593 subfields gives the width of the glyph.
597 subfield gives the height of the glyph (upwards is positive);
598 if a glyph does not extend above the baseline, it should be
599 given a zero height, rather than a negative height.
603 subfield gives the depth of the glyph, that is, the distance
604 below the lowest point below the baseline to which the
605 glyph extends (downwards is positive);
606 if a glyph does not extend below above the baseline, it should be
607 given a zero depth, rather than a negative depth.
611 subfield gives the amount of space that should be added after the
612 glyph when it is immediately to be followed by a glyph
616 .I left-italic-correction
617 subfield gives the amount of space that should be added before the
618 glyph when it is immediately to be preceded by a glyph
622 .I subscript-correction
623 gives the amount of space that should be added after a glyph
624 before adding a subscript.
626 This should be less than the italic correction.
629 A line in the charset section can also have the format
638 is just another name for the glyph mentioned in the
644 starts the kernpairs section.
646 This contains a sequence of lines of the form:
652 This means that when glyph
654 appears next to glyph
656 the space between them should be increased by\~\c
659 Most entries in kernpairs section have a negative value for\~\c
665 .Tp \w'@FONTDIR@/devname/DESC'u+3n
666 .BI @FONTDIR@/dev name /DESC
667 Device description file for device
671 .BI @FONTDIR@/dev name / F
672 Font file for font\~\c
680 .BR groff_out (@MAN5EXT@),
681 .BR @g@troff (@MAN1EXT@).