2 Copyright (C) 1989-1995, 2001, 2002, 2003, 2004 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
54 There are two types of file: a
55 device description file called
63 unlike the ditroff font format,
64 there is no associated binary format.
69 The DESC file can contain the following types of line as shown below.
71 Later entries in the file override previous values.
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
88 will be 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 will cause no font to be mounted on the corresponding font position.
102 The horizontal resolution is
107 .BI image_generator\ string
111 It specifies the program to generate PNG images from
113 Under GNU/Linux this is usually
115 but under other systems (notably cygwin) it might be set to another name.
119 The physical vertical dimension of the output medium in machine units.
123 itself but by output devices.
132 .BI papersize\ string
137 are the ISO paper types A0-A7, B0-B7, C0-C7, D0-D7, DL, and the US paper
138 types letter, legal, tabloid, ledger, statement, executive, com10, and
141 Case is not significant for
143 if it holds predefined paper types.
147 can be a file name (e.g.\& `/etc/papersize'); if the file can be opened,
149 reads the first line and tests for the above paper sizes.
153 can be a custom paper size in the format
155 (no spaces before and after the comma).
161 must have a unit appended; valid values are `i' for inches, `c' for
162 centimeters, `p' for points, and `P' for picas.
167 An argument which starts with a digit is always treated as a custom paper
171 sets both the vertical and horizontal dimension of the output medium.
174 More than one argument can be specified;
176 scans from left to right and uses the first valid paper specification.
180 The physical horizontal dimension of the output medium in machine units.
190 itself but by output devices.
194 Make troff tell the driver the source file name being processed.
196 This is achieved by another tcommand:
204 as the postprocessor.
216 as the spooler program for printing.
230 machine units per inch.
233 .BI sizes\ s1\ s2\|.\|.\|.\|sn\ 0
234 This means that the device has fonts at
236 .IR s2 ,\|.\|.\|.\| sn
239 The list of sizes must be terminated by a
244 can also be a range of sizes
247 The list can extend over more than one line.
251 The scale factor for pointsizes.
253 By default this has a value of 1.
266 commands are given in scaled points.
269 .BI styles\ S1\ S2\|.\|.\|.\|Sm
272 font positions will be associated with styles
273 .IR S1\|.\|.\|.\|Sm .
277 This means that the postprocessor can handle the
285 Quantities in the font files are given in machine units
286 for fonts whose point size is
291 .B unscaled_charwidths
292 Make the font handling module always return unscaled character widths.
298 .B use_charnames_in_special
299 This command indicates that troff should encode named characters inside
304 The vertical resolution is
315 lines are compulsory.
317 Not all commands in the DESC file are used by
319 itself; some of the keywords (or even additional ones) are used by
320 postprocessors to store arbitrary information about the device.
323 Here a list of obsolete keywords which are recognized by
325 but completely ignored:
333 A font file has two sections.
334 The first section is a sequence
335 of lines each containing a sequence of blank delimited
336 words; the first word in the line is a key, and subsequent
337 words give a value for that key.
340 .BI ligatures\ lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
343 .IR lig2 ,\ \|.\|.\|.,\ lign
344 are ligatures; possible ligatures are
352 For backwards compatibility, the list of ligatures may be terminated
356 The list of ligatures may not extend over more than one line.
360 The name of the font is
365 The characters of the font have a slant of
369 (Positive means forward.)
373 The normal width of a space is
380 this means that when a character is requested that is not present in
381 the current font, it will be searched for in any special fonts that
385 Other commands are ignored by
387 but may be used by postprocessors to store arbitrary information
388 about the font in the font file.
391 The first section can contain comments which start with the
393 character and extend to the end of a line.
396 The second section contains one or two subsections.
401 and it may also contain a
405 These subsections can appear in any order.
407 Each subsection starts with a word on a line by itself.
412 starts the charset subsection.
416 line is followed by a sequence of lines.
418 Each line gives information for one character.
420 A line comprises a number of fields separated
426 .I name metrics type code
433 identifies the character:
436 is a single character
438 then it corresponds to the groff input character
442 where c is a single character, then it
443 corresponds to the special character
445 otherwise it corresponds to the groff input character
446 .BI \[rs][ name ]\fR.
448 If it is exactly two characters
453 Note that single-letter special characters can't be accessed as
455 the only exception is `\[rs]-' which is identical to `\[rs][-]'.
459 is special and indicates that the character is unnamed;
460 such characters can only be used by means of the
466 Groff supports eight-bit characters; however some utilities
467 have difficulties with eight-bit characters.
469 For this reason, there is a convention that the name
471 is equivalent to the single character whose code is
476 would be equivalent to the character with code 163
477 which is the pounds sterling sign in ISO Latin-1.
482 field gives the character type:
486 means the character has a descender, for example, p;
490 means the character has an ascender, for example, b;
494 means the character has both an ascender and a descender, for example,
500 field gives the code which the postprocessor uses to print the character.
502 The character can also be input to groff using this code by means of the
506 The code can be any integer.
510 it will be interpreted as octal;
515 it will be intepreted as hexadecimal.
517 Note, however, that the
519 escape sequence only accepts a decimal integer.
524 field gives an ascii string identifying the glyph which the postprocessor
525 uses to print the character.
527 This field is optional and has been introduced so that the html device driver
528 can encode its character set.
530 For example, the character `\[rs][Po]' is represented as `£' in
534 Anything on the line after the encoding field resp. after `-\&-' will
540 field has the form (in one line; it is broken here for the sake of
547 .RI [\fB, italic-correction
549 .RI [\fB, left-italic-correction\c
550 .RI [\fB, subscript-correction ]]]]]
553 There must not be any spaces between these subfields.
555 Missing subfields are assumed to be 0.
557 The subfields are all decimal integers.
559 Since there is no associated binary format, these
560 values are not required to fit into a variable of type
562 as they are in ditroff.
566 subfields gives the width of the character.
570 subfield gives the height of the character (upwards is positive);
571 if a character does not extend above the baseline, it should be
572 given a zero height, rather than a negative height.
576 subfield gives the depth of the character, that is, the distance
577 below the lowest point below the baseline to which the
578 character extends (downwards is positive);
579 if a character does not extend below above the baseline, it should be
580 given a zero depth, rather than a negative depth.
584 subfield gives the amount of space that should be added after the
585 character when it is immediately to be followed by a character
589 .I left-italic-correction
590 subfield gives the amount of space that should be added before the
591 character when it is immediately to be preceded by a character
595 .I subscript-correction
596 gives the amount of space that should be added after a character
597 before adding a subscript.
599 This should be less than the italic correction.
602 A line in the charset section can also have the format
611 is just another name for the character mentioned in the
617 starts the kernpairs section.
619 This contains a sequence of lines of the form:
625 This means that when character
627 appears next to character
629 the space between them should be increased by
632 Most entries in kernpairs section will have a negative value for
638 .Tp \w'@FONTDIR@/devname/DESC'u+3n
639 .BI @FONTDIR@/dev name /DESC
640 Device description file for device
644 .BI @FONTDIR@/dev name / F
653 .BR groff_out (@MAN5EXT@),
654 .BR @g@troff (@MAN1EXT@).