groff_font.man revision 75584
118099Spst.ig \"-*- nroff -*-
275584SruCopyright (C) 1989-1995, 2001 Free Software Foundation, Inc.
318099Spst
418099SpstPermission is granted to make and distribute verbatim copies of
518099Spstthis manual provided the copyright notice and this permission notice
618099Spstare preserved on all copies.
718099Spst
818099SpstPermission is granted to copy and distribute modified versions of this
918099Spstmanual under the conditions for verbatim copying, provided that the
1018099Spstentire resulting derived work is distributed under the terms of a
1118099Spstpermission notice identical to this one.
1218099Spst
1318099SpstPermission is granted to copy and distribute translations of this
1418099Spstmanual into another language, under the above conditions for modified
1518099Spstversions, except that this permission notice may be included in
1618099Spsttranslations approved by the Free Software Foundation instead of in
1718099Spstthe original English.
1818099Spst..
1918099Spst.de TQ
2018099Spst.br
2118099Spst.ns
2218099Spst.TP \\$1
2318099Spst..
2418099Spst.\" Like TP, but if specified indent is more than half
2518099Spst.\" the current line-length - indent, use the default indent.
2618099Spst.de Tp
2718099Spst.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
2818099Spst.el .TP "\\$1"
2918099Spst..
3018099Spst.TH GROFF_FONT @MAN5EXT@ "@MDATE@" "Groff Version @VERSION@"
3118099Spst.SH NAME
3218099Spstgroff_font \- format of groff device and font description files
3318099Spst.SH DESCRIPTION
3418099SpstThe groff font format is roughly a superset of the ditroff
3518099Spstfont format.
3618099SpstUnlike the ditroff font format, there is no associated binary
3718099Spstformat.
3818099SpstThe font files for device
3918099Spst.I name
4018099Spstare stored in a directory
4118099Spst.BI dev name.
4218099SpstThere are two types of file: a
4318099Spstdevice description file called
4418099Spst.B DESC
4518099Spstand for each font
4618099Spst.I F
4718099Spsta font file called
4818099Spst.IR F .
4918099SpstThese are text files;
5018099Spstthere is no associated binary format.
5118099Spst.SS DESC file format
5218099SpstThe DESC file can contain the following types of line:
5318099Spst.TP
5418099Spst.BI res\  n
5518099SpstThere are
5618099Spst.I n
5718099Spstmachine units per inch.
5818099Spst.TP
5918099Spst.BI hor\  n
6018099SpstThe horizontal resolution is
6118099Spst.I n
6218099Spstmachine units.
6318099Spst.TP
6418099Spst.BI vert\  n
6518099SpstThe vertical resolution is
6618099Spst.I n
6718099Spstmachine units.
6818099Spst.TP
6918099Spst.BI sizescale\  n
7018099SpstThe scale factor for pointsizes.
7118099SpstBy default this has a value of 1.
7218099SpstOne
7318099Spst.I
7418099Spstscaled point
7518099Spstis equal to
7618099Spstone
7718099Spst.RI point/ n .
7818099SpstThe arguments to the
7918099Spst.B unitwidth
8018099Spstand
8118099Spst.B sizes
8218099Spstcommands are given in scaled points.
8318099Spst.TP
8418099Spst.BI unitwidth\  n
8518099SpstQuantities in the font files are given in machine units
8618099Spstfor fonts whose point size is
8718099Spst.I n 
8818099Spstscaled points.
8918099Spst.TP
9075584Sru.BI prepro\  program
9175584SruCall
9275584Sru.I program
9375584Sruas a preprocessor.
9475584Sru.TP
9575584Sru.BI postpro\  program
9675584SruUse
9775584Sru.I program
9875584Sruas the postprocessor.
9975584Sru.TP
10018099Spst.B tcommand
10118099SpstThis means that the postprocessor can handle the
10218099Spst.B t
10318099Spstand
10418099Spst.B u
10518099Spstoutput commands.
10618099Spst.TP
10718099Spst.BI sizes\  s1\ s2\|.\|.\|.\|sn\  0
10818099SpstThis means that the device has fonts at
10918099Spst.IR s1 ,
11018099Spst.IR s2 ,\|.\|.\|.\| sn
11118099Spstscaled points.
11218099SpstThe list of sizes must be terminated by a
11318099Spst.BR 0 .
11418099SpstEach
11518099Spst.BI s i
11618099Spstcan also be a range of sizes
11718099Spst.IR m \- n .
11818099SpstThe list can extend over more than one line.
11918099Spst.TP
12018099Spst.BI styles\  S1\ S2\|.\|.\|.\|Sm
12118099SpstThe first
12218099Spst.I m
12318099Spstfont positions will be associated with styles
12418099Spst.IR S1\|.\|.\|.\|Sm .
12518099Spst.TP
12618099Spst.BI fonts\  n\ F1\ F2\ F3\|.\|.\|.\|Fn
12718099SpstFonts
12818099Spst.I F1\|.\|.\|.\|Fn
12918099Spstwill be mounted in the font positions 
13018099Spst.IR m +1,\|.\|.\|., m + n
13118099Spstwhere
13218099Spst.I m
13318099Spstis the number of styles.
13418099SpstThis command may extend over more than one line.
13518099SpstA font name of
13618099Spst.B 0
13718099Spstwill cause no font to be mounted on the corresponding font position.
13818099Spst.TP
13918099Spst.BI family\  fam
14018099SpstThe default font family is
14118099Spst.IR fam .
14218099Spst.TP
14369626Sru.B use_charnames_in_special
14469626SruThis command indicates that troff should encode named characters inside
14569626Sruspecial commands.
14669626Sru.TP
14769626Sru.B pass_filenames
14869626Srurequests that troff tells the driver the source file name being processed.
14969626SruThis is achieved by another tcommand:
15069626Sru.B F
15169626Sru.IR filename .
15269626Sru.TP
15318099Spst.B charset
15418099SpstThis line and everything following in the file are ignored.
15518099SpstIt is allowed for the sake of backwards compatibility.
15675584Sru.TP
15775584Sru.BI print\  program
15875584SruUse
15975584Sru.I program
16075584Sruas the spooler program for printing.
16175584SruIf omitted, the
16275584Sru.B \-l
16375584Sruand
16475584Sru.B \-L
16575584Sruoptions of
16675584Sru.B groff
16775584Sruare ignored.
16818099Spst.LP
16918099SpstThe res, unitwidth, fonts and sizes lines are compulsory.
17018099SpstOther commands are ignored by
17118099Spst.B troff
17218099Spstbut may be used by postprocessors to store arbitrary information
17318099Spstabout the device in the DESC file.
17469626Sru.LP
17569626SruHere a list of obsolete keywords which are recognized by
17669626Sru.B groff
17769626Srubut completely ignored:
17869626Sru.BR spare1 ,
17969626Sru.BR spare2 ,
18069626Sru.BR biggestfont .
18118099Spst.SS Font file format
18218099SpstA font file has two sections. The first section is a sequence
18318099Spstof lines each containing a sequence of blank delimited
18418099Spstwords; the first word in the line is a key, and subsequent
18518099Spstwords give a value for that key.
18618099Spst.TP
18718099Spst.BI name\  F
18818099SpstThe name of the font is
18918099Spst.IR F .
19018099Spst.TP
19118099Spst.BI spacewidth\  n
19218099SpstThe normal width of a space is
19318099Spst.IR n .
19418099Spst.TP
19518099Spst.BI slant\  n
19618099SpstThe characters of the font have a slant of
19718099Spst.I n
19818099Spstdegrees. (Positive means forward.)
19918099Spst.TP
20018099Spst.BI ligatures\  lig1\ lig2\|.\|.\|.\|lign\ \fR[ 0 \fR]
20118099SpstCharacters
20218099Spst.IR lig1 ,
20318099Spst.IR lig2 ,\|.\|.\|., lign
20418099Spstare ligatures; possible ligatures are
20518099Spst.BR ff ,
20618099Spst.BR fi ,
20769626Sru.BR fl ,
20869626Sru.B ffi
20918099Spstand
21018099Spst.BR ffl .
21118099SpstFor backwards compatibility, the list of ligatures may be terminated
21218099Spstwith a
21318099Spst.BR 0.
21418099SpstThe list of ligatures may not extend over more than one line.
21518099Spst.TP
21618099Spst.B special
21718099SpstThe font is
21818099Spst.IR special ;
21918099Spstthis means that when a character is requested that is not present in
22018099Spstthe current font, it will be searched for in any special fonts that
22118099Spstare mounted.
22218099Spst.LP
22318099SpstOther commands are ignored by
22418099Spst.B troff
22518099Spstbut may be used by postprocessors to store arbitrary information
22618099Spstabout the font in the font file.
22718099Spst.LP
22818099SpstThe first section can contain comments which start with the
22918099Spst.B #
23018099Spstcharacter and extend to the end of a line.
23118099Spst.LP
23218099SpstThe second section contains one or two subsections.
23318099SpstIt must contain a
23418099Spst.I charset
23518099Spstsubsection
23618099Spstand it may also contain a
23718099Spst.I kernpairs
23818099Spstsubsection.
23918099SpstThese subsections can appear in any order.
24018099SpstEach subsection starts with a word on a line by itself.
24118099Spst.LP
24218099SpstThe word
24318099Spst.B charset
24418099Spststarts the charset subsection.
24518099SpstThe
24618099Spst.B charset
24718099Spstline is followed by a sequence of lines.
24818099SpstEach line gives information for one character.
24918099SpstA line comprises a number of fields separated
25018099Spstby blanks or tabs. The format is
25118099Spst.IP
25269626Sru.I name metrics type code 
25369626Sru.RI [ entity_name ]
25469626Sru.RB [ --
25569626Sru.IR comment ]
25618099Spst.LP
25718099Spst.I name
25818099Spstidentifies the character:
25918099Spstif
26018099Spst.I name
26118099Spstis a single character
26218099Spst.I c
26318099Spstthen it corresponds to the groff input character
26418099Spst.IR c ;
26518099Spstif it is of the form
26618099Spst.BI \e c
26718099Spstwhere c is a single character, then it
26818099Spstcorresponds to the groff input character
26918099Spst.BI \e c\fR;
27018099Spstotherwise it corresponds to the groff input character
27118099Spst.BI \e[ name ]
27218099Spst(if it is exactly two characters
27318099Spst.I xx
27418099Spstit can be entered as
27575584Sru.BI \e( xx\fR).
27618099SpstGroff supports eight bit characters; however some utilities
27718099Spsthas difficulties with eight bit characters.
27818099SpstFor this reason, there is a convention that the name
27918099Spst.BI char n
28018099Spstis equivalent to the single character whose code is
28118099Spst.I n .
28218099SpstFor example,
28318099Spst.B char163
28418099Spstwould be equivalent to the character with code 163
28518099Spstwhich is the pounds sterling sign in ISO Latin-1.
28618099SpstThe name
28718099Spst.B \-\-\-
28818099Spstis special and indicates that the character is unnamed;
28918099Spstsuch characters can only be used by means of the
29018099Spst.B \eN
29118099Spstescape sequence in
29218099Spst.BR troff .
29318099Spst.LP
29418099SpstThe
29518099Spst.I type
29618099Spstfield gives the character type:
29718099Spst.TP
29818099Spst1
29918099Spstmeans the character has an descender, for example, p;
30018099Spst.TP
30118099Spst2
30218099Spstmeans the character has an ascender, for example, b;
30318099Spst.TP
30418099Spst3
30518099Spstmeans the character has both an ascender and a descender, for example,
30618099Spst(.
30718099Spst.LP
30818099SpstThe
30918099Spst.I code
31018099Spstfield gives the code which the postprocessor uses to print the character.
31118099SpstThe character can also be input to groff using this code by means of the
31218099Spst.B \eN
31318099Spstescape sequence.
31418099SpstThe code can be any integer.
31518099SpstIf it starts with a
31618099Spst.B 0
31718099Spstit will be interpreted as octal;
31818099Spstif it starts with
31918099Spst.B 0x
32018099Spstor
32118099Spst.B 0X
32218099Spstit will be intepreted as hexadecimal.
32318099Spst.LP
32469626SruThe
32569626Sru.I entity_name
32669626Srufield gives an ascii string identifying the glyph which the postprocessor
32769626Sruuses to print the character.
32869626SruThis field is optional and has been introduced so that the html device driver
32969626Srucan encode its character set.
33069626SruFor example, the character `\e[Po]' is represented as `£' in html 4.0.
33118099Spst.LP
33269626SruAnything on the line after the encoding field resp. after `-\&-' will
33369626Srube ignored.
33469626Sru.LP
33518099SpstThe
33618099Spst.I metrics
33718099Spstfield has the form:
33818099Spst.IP
33918099Spst.IR width [\fB, height [\fB, depth [\fB, italic_correction [\fB, \
34018099Spstleft_italic_correction [\fB, subscript_correction ]]]]]
34118099Spst.LP
34218099SpstThere must not be any spaces between these subfields.
34318099SpstMissing subfields are assumed to be 0.
34418099SpstThe subfields are all decimal integers.
34518099SpstSince there is no associated binary format, these
34618099Spstvalues are not required to fit into a variable of type
34718099Spst.B char
34818099Spstas they are in ditroff.
34918099SpstThe
35018099Spst.I width
35118099Spstsubfields gives the width of the character.
35218099SpstThe
35318099Spst.I height
35418099Spstsubfield gives the height of the character (upwards is positive);
35518099Spstif a character does not extend above the baseline, it should be
35618099Spstgiven a zero height, rather than a negative height.
35718099SpstThe
35818099Spst.I depth
35918099Spstsubfield gives the depth of the character, that is, the distance
36018099Spstbelow the lowest point below the baseline to which the
36118099Spstcharacter extends (downwards is positive);
36218099Spstif a character does not extend below above the baseline, it should be
36318099Spstgiven a zero depth, rather than a negative depth.
36418099SpstThe
36518099Spst.I italic_correction
36618099Spstsubfield gives the amount of space that should be added after the
36718099Spstcharacter when it is immediately to be followed by a character
36818099Spstfrom a roman font.
36918099SpstThe
37018099Spst.I left_italic_correction
37118099Spstsubfield gives the amount of space that should be added before the
37218099Spstcharacter when it is immediately to be preceded by a character
37318099Spstfrom a roman font.
37418099SpstThe
37518099Spst.I subscript_correction
37618099Spstgives the amount of space that should be added after a character
37718099Spstbefore adding a subscript.
37818099SpstThis should be less than the italic correction.
37918099Spst.LP
38018099SpstA line in the charset section can also have the format
38118099Spst.IP
38218099Spst.I
38318099Spstname \fB"
38418099Spst.LP
38518099SpstThis indicates that
38618099Spst.I name
38718099Spstis just another name for the character mentioned in the
38818099Spstpreceding line.
38918099Spst.LP
39018099SpstThe word
39118099Spst.B kernpairs
39218099Spststarts the kernpairs section.
39318099SpstThis contains a sequence of lines of the form:
39418099Spst.IP
39518099Spst.I
39618099Spstc1 c2 n
39718099Spst.LP
39818099SpstThis means that when character
39918099Spst.I c1
40018099Spstappears next to character
40118099Spst.I c2
40218099Spstthe space between them should be increased by
40318099Spst.IR n .
40418099SpstMost entries in kernpairs section will have a negative value for
40518099Spst.IR n .
40618099Spst.SH FILES
40718099Spst.Tp \w'@FONTDIR@/devname/DESC'u+3n
40818099Spst.BI @FONTDIR@/dev name /DESC
40918099SpstDevice description file for device
41018099Spst.IR name .
41118099Spst.TP
41218099Spst.BI @FONTDIR@/dev name / F
41318099SpstFont file for font
41418099Spst.I F
41518099Spstof device
41618099Spst.IR name .
41718099Spst.SH "SEE ALSO"
41818099Spst.BR groff_out (@MAN5EXT@),
41918099Spst.BR @g@troff (@MAN1EXT@).
420