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 Quantities in the font files are given in machine units
292 for fonts whose point size is
297 .B unscaled_charwidths
298 Make the font handling module always return unscaled character widths.
305 .B use_charnames_in_special
306 This command indicates that troff should encode named characters inside
311 The vertical resolution is
322 lines are compulsory.
324 Not all commands in the DESC file are used by
326 itself; some of the keywords (or even additional ones) are used by
327 postprocessors to store arbitrary information about the device.
330 Here a list of obsolete keywords which are recognized by
332 but completely ignored:
340 A font file has two sections;
341 empty lines are ignored in both of them.
344 The first section is a sequence
345 of lines each containing a sequence of blank delimited
346 words; the first word in the line is a key, and subsequent
347 words give a value for that key.
350 .BI ligatures\ lig1\ lig2\ \|.\|.\|.\|\ lign\ \fR[ 0 \fR]
353 .IR lig2 ,\ \|.\|.\|.,\ lign
354 are ligatures; possible ligatures are
362 For backwards compatibility, the list of ligatures may be terminated
366 The list of ligatures may not extend over more than one line.
370 The name of the font is
375 The characters of the font have a slant of
379 (Positive means forward.)
383 The normal width of a space is
390 this means that when a character is requested that is not present in
391 the current font, it is searched for in any special fonts that are mounted.
394 Other commands are ignored by
396 but may be used by postprocessors to store arbitrary information
397 about the font in the font file.
400 The first section can contain comments which start with the
402 character and extend to the end of a line.
405 The second section contains one or two subsections.
410 and it may also contain a
414 These subsections can appear in any order.
416 Each subsection starts with a word on a line by itself.
421 starts the charset subsection.
425 line is followed by a sequence of lines.
427 Each line gives information for one character.
429 A line comprises a number of fields separated
435 .I name metrics type code
442 identifies the character:
445 is a single character
447 then it corresponds to the groff input character
451 where c is a single character, then it
452 corresponds to the special character
454 otherwise it corresponds to the groff input character
455 .BI \[rs][ name ]\fR.
457 If it is exactly two characters
462 Note that single-letter special characters can't be accessed as
464 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
468 is special and indicates that the character is unnamed;
469 such characters can only be used by means of the
475 Groff supports eight-bit characters; however some utilities
476 have difficulties with eight-bit characters.
478 For this reason, there is a convention that the name
480 is equivalent to the single character whose code is
485 would be equivalent to the character with code 163
486 which is the pounds sterling sign in ISO Latin-1.
491 field gives the character type:
495 means the character has a descender, for example, p;
499 means the character has an ascender, for example, b;
503 means the character has both an ascender and a descender, for example,
509 field gives the code which the postprocessor uses to print the character.
511 The character can also be input to groff using this code by means of the
515 The code can be any integer.
519 it is interpreted as octal;
524 it is intepreted as hexadecimal.
526 Note, however, that the
528 escape sequence only accepts a decimal integer.
533 field gives an ascii string identifying the glyph which the postprocessor
534 uses to print the character.
536 This field is optional and is currently used by
538 to build sub-encoding arrays for PS fonts containing more than 256 glyphs.
540 (It has also been used for
542 entity names but for efficiency reasons this data is now compiled directly
547 Anything on the line after the encoding field or `-\&-' are ignored.
552 field has the form (in one line; it is broken here for the sake of
559 .RI [\fB, italic-correction
561 .RI [\fB, left-italic-correction\c
562 .RI [\fB, subscript-correction ]]]]]
565 There must not be any spaces between these subfields.
567 Missing subfields are assumed to be 0.
569 The subfields are all decimal integers.
571 Since there is no associated binary format, these
572 values are not required to fit into a variable of type
574 as they are in ditroff.
578 subfields gives the width of the character.
582 subfield gives the height of the character (upwards is positive);
583 if a character does not extend above the baseline, it should be
584 given a zero height, rather than a negative height.
588 subfield gives the depth of the character, that is, the distance
589 below the lowest point below the baseline to which the
590 character extends (downwards is positive);
591 if a character does not extend below above the baseline, it should be
592 given a zero depth, rather than a negative depth.
596 subfield gives the amount of space that should be added after the
597 character when it is immediately to be followed by a character
601 .I left-italic-correction
602 subfield gives the amount of space that should be added before the
603 character when it is immediately to be preceded by a character
607 .I subscript-correction
608 gives the amount of space that should be added after a character
609 before adding a subscript.
611 This should be less than the italic correction.
614 A line in the charset section can also have the format
623 is just another name for the character mentioned in the
629 starts the kernpairs section.
631 This contains a sequence of lines of the form:
637 This means that when character
639 appears next to character
641 the space between them should be increased by
644 Most entries in kernpairs section have a negative value for
650 .Tp \w'@FONTDIR@/devname/DESC'u+3n
651 .BI @FONTDIR@/dev name /DESC
652 Device description file for device
656 .BI @FONTDIR@/dev name / F
665 .BR groff_out (@MAN5EXT@),
666 .BR @g@troff (@MAN1EXT@).