1GROFF_FONT(5)                 File Formats Manual                GROFF_FONT(5)
2
3
4

NAME

6       groff_font - format of groff device and font description files
7

DESCRIPTION

9       The groff font format is roughly a superset of the ditroff font format.
10       The font files for device name  are  stored  in  a  directory  devname.
11       There  are two types of file: a device description file called DESC and
12       for each font F a font file called F.  These are text files; unlike the
13       ditroff font format, there is no associated binary format.
14
15   DESC file format
16       The  DESC  file can contain the following types of line as shown below.
17       Later entries in the file override previous values.
18
19       charset
20              This line and everything following in the file are ignored.   It
21              is allowed for the sake of backwards compatibility.
22
23       family fam
24              The default font family is fam.
25
26       fonts n F1 F2 F3...Fn
27              Fonts  F1...Fn will be mounted in the font positions m+1,...,m+n
28              where m is the number of styles.  This command may  extend  over
29              more  than  one line.  A font name of 0 will cause no font to be
30              mounted on the corresponding font position.
31
32       hor n  The horizontal resolution is n machine units.
33
34       paperheight n
35              The physical vertical dimension of the output medium in  machine
36              units.   This  isn't used by troff itself; currently, only grops
37              uses it.
38
39       paperwidth n
40              The physical  horizontal  dimension  of  the  output  medium  in
41              machine  units.   This isn't used by troff.  Currently, only the
42              grolbp output device uses it.
43
44       papersize string
45              Select a paper size.  Valid values for string are the ISO  paper
46              types  A0-A7,  B0-B7,  C0-C7,  D0-D7, DL, and the US paper types
47              letter, legal, tabloid, ledger, statement, executive, com10, and
48              monarch.   Case is not significant for string if it holds prede‐
49              fined paper types.  Alternatively, string can  be  a  file  name
50              (e.g.  `/etc/papersize'); if the file can be opened, groff reads
51              the first line and tests for the above  paper  sizes.   Finally,
52              string can be a custom paper size in the format length,width (no
53              spaces before and after the comma).  Both length and width  must
54              have  a  unit appended; valid values are `i' for inches, `c' for
55              centimeters, `p'  for  points,  and  `P'  for  picas.   Example:
56              12c,235p.   An  argument  which  starts  with  a digit is always
57              treated as a custom paper format.  papersize sets both the  ver‐
58              tical and horizontal dimension of the output medium.
59
60              More  than  one argument can be specified; groff scans from left
61              to right and uses the first valid paper specification.
62
63       pass_filenames
64              Make troff tell the driver the source file name being processed.
65              This is achieved by another tcommand: F filename.
66
67       postpro program
68              Use program as the postprocessor.
69
70       prepro program
71              Call program as a preprocessor.
72
73       print program
74              Use  program  as  the spooler program for printing.  If omitted,
75              the -l and -L options of groff are ignored.
76
77       res n  There are n machine units per inch.
78
79       sizes s1 s2...sn 0
80              This means that the device has  fonts  at  s1,  s2,...sn  scaled
81              points.   The  list of sizes must be terminated by a 0.  Each si
82              can also be a range of sizes m-n.  The list can extend over more
83              than one line.
84
85       sizescale n
86              The scale factor for pointsizes.  By default this has a value of
87              1.  One scaled point is equal to one point/n.  The arguments  to
88              the unitwidth and sizes commands are given in scaled points.
89
90       styles S1 S2...Sm
91              The  first  m  font  positions  will  be  associated with styles
92              S1...Sm.
93
94       tcommand
95              This means that the postprocessor can handle the t and u  output
96              commands.
97
98       unitwidth n
99              Quantities  in  the  font  files  are given in machine units for
100              fonts whose point size is n scaled points.
101
102       use_charnames_in_special
103              This command indicates that troff should encode named characters
104              inside special commands.
105
106       vert n The vertical resolution is n machine units.
107
108       The  res, unitwidth, fonts, and sizes lines are compulsory.  Other com‐
109       mands are ignored by troff but may be used by postprocessors  to  store
110       arbitrary information about the device in the DESC file.
111
112       Here a list of obsolete keywords which are recognized by groff but com‐
113       pletely ignored: spare1, spare2, biggestfont.
114
115   Font file format
116       A font file has two sections.  The first section is a sequence of lines
117       each  containing a sequence of blank delimited words; the first word in
118       the line is a key, and subsequent words give a value for that key.
119
120       ligatures lig1 lig2...lign [0]
121              Characters lig1, lig2, ..., lign are ligatures;  possible  liga‐
122              tures are ff, fi, fl, ffi and ffl.  For backwards compatibility,
123              the list of ligatures may be terminated with a 0.  The  list  of
124              ligatures may not extend over more than one line.
125
126       name F The name of the font is F.
127
128       slant n
129              The characters of the font have a slant of n degrees.  (Positive
130              means forward.)
131
132       spacewidth n
133              The normal width of a space is n.
134
135       special
136              The font is  special;  this  means  that  when  a  character  is
137              requested  that  is  not present in the current font, it will be
138              searched for in any special fonts that are mounted.
139
140       Other commands are ignored by troff but may be used  by  postprocessors
141       to store arbitrary information about the font in the font file.
142
143       The first section can contain comments which start with the # character
144       and extend to the end of a line.
145
146       The second section contains one or two subsections.  It must contain  a
147       charset  subsection  and  it  may  also contain a kernpairs subsection.
148       These subsections can appear in any order.  Each subsection starts with
149       a word on a line by itself.
150
151       The  word  charset  starts the charset subsection.  The charset line is
152       followed by a sequence of lines.  Each line gives information  for  one
153       character.   A line comprises a number of fields separated by blanks or
154       tabs.  The format is
155
156              name metrics type code [entity_name] [-- comment]
157
158       name identifies the character: if name is a single character c then  it
159       corresponds  to  the  groff  input character c; if it is of the form \c
160       where c is a single character, then it corresponds to the special char‐
161       acter  \[c];  otherwise  it  corresponds  to  the groff input character
162       \[name].  If it is exactly two characters xx it can be entered as \(xx.
163       Note that single-letter special characters can't be accessed as \c; the
164       only exception is `\-' which is identical to `\[-]'.  The name  ---  is
165       special  and  indicates  that the character is unnamed; such characters
166       can only be used by means of the \N escape sequence in troff.
167
168       Groff supports eight-bit characters; however some utilities have diffi‐
169       culties with eight-bit characters.  For this reason, there is a conven‐
170       tion that the name charn is equivalent to the  single  character  whose
171       code  is  n.  For example, char163 would be equivalent to the character
172       with code 163 which is the pounds sterling sign in ISO Latin-1.
173
174       The type field gives the character type:
175
176       1      means the character has a descender, for example, p;
177
178       2      means the character has an ascender, for example, b;
179
180       3      means the character has both an ascender and  a  descender,  for
181              example, (.
182
183       The code field gives the code which the postprocessor uses to print the
184       character.  The character can also be input to groff using this code by
185       means  of  the \N escape sequence.  The code can be any integer.  If it
186       starts with a 0 it will be interpreted as octal; if it starts  with  0x
187       or 0X it will be intepreted as hexadecimal.  Note, however, that the \N
188       escape sequence only accepts a decimal integer.
189
190       The entity_name field gives an ascii string identifying the glyph which
191       the  postprocessor uses to print the character.  This field is optional
192       and has been introduced so that the html device driver can  encode  its
193       character  set.   For  example, the character `\[Po]' is represented as
194       `£' in html 4.0.
195
196       Anything on the line after the encoding field resp. after `--' will  be
197       ignored.
198
199       The  metrics field has the form (in one line; it is broken here for the
200       sake of readability):
201
202              width[,height[,depth[,italic-correction
203              [,left-italic-correction[,subscript-correction]]]]]
204
205       There must not be any spaces between  these  subfields.   Missing  sub‐
206       fields  are  assumed  to be 0.  The subfields are all decimal integers.
207       Since there is no  associated  binary  format,  these  values  are  not
208       required  to  fit  into a variable of type char as they are in ditroff.
209       The width subfields gives the width of the character.  The height  sub‐
210       field  gives  the  height  of the character (upwards is positive); if a
211       character does not extend above the baseline, it should be given a zero
212       height,  rather  than  a negative height.  The depth subfield gives the
213       depth of the character, that is, the distance below  the  lowest  point
214       below  the  baseline to which the character extends (downwards is posi‐
215       tive); if a character does not extend  below  above  the  baseline,  it
216       should  be  given  a  zero  depth,  rather  than a negative depth.  The
217       italic-correction subfield gives the amount of  space  that  should  be
218       added  after  the  character when it is immediately to be followed by a
219       character from a roman font.  The left-italic-correction subfield gives
220       the  amount  of space that should be added before the character when it
221       is immediately to be preceded by a character from a  roman  font.   The
222       subscript-correction  gives  the  amount  of space that should be added
223       after a character before adding a subscript.  This should be less  than
224       the italic correction.
225
226       A line in the charset section can also have the format
227
228              name "
229
230       This  indicates  that  name is just another name for the character men‐
231       tioned in the preceding line.
232
233       The word kernpairs starts  the  kernpairs  section.   This  contains  a
234       sequence of lines of the form:
235
236              c1 c2 n
237
238       This  means  that  when  character  c1 appears next to character c2 the
239       space between them should be increased by n.  Most entries in kernpairs
240       section will have a negative value for n.
241

FILES

243       /usr/share/groff/1.18.1.4/font/devname/DESC
244              Device description file for device name.
245
246       /usr/share/groff/1.18.1.4/font/devname/F
247              Font file for font F of device name.
248

SEE ALSO

250       groff_out(5), troff(1).
251
252
253
254Groff Version 1.18.1.4         12 September 2002                 GROFF_FONT(5)
Impressum