version 4, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
GROFF_FONT |
|
|
2 |
!!!GROFF_FONT |
|
|
3 |
NAME |
|
|
4 |
DESCRIPTION |
|
|
5 |
FILES |
|
|
6 |
SEE ALSO |
|
|
7 |
---- |
|
|
8 |
!!NAME |
|
|
9 |
|
|
|
10 |
|
|
|
11 |
groff_font - format of groff device and font description files |
|
|
12 |
!!DESCRIPTION |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
The groff font format is roughly a superset of the ditroff |
|
|
16 |
font format. Unlike the ditroff font format, there is no |
|
|
17 |
associated binary format. The font files for device |
|
|
18 |
''name'' are stored in a directory __dev__''name.'' |
|
|
19 |
There are two types of file: a device description file |
|
|
20 |
called __DESC__ and for each font ''F'' a font file |
|
|
21 |
called ''F''. These are text files; there is no |
|
|
22 |
associated binary format. |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
__DESC file format__ |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
The DESC file can contain the following types of |
|
|
29 |
line: |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
__res__ ''n'' |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
There are ''n'' machine units per inch. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
__hor__ ''n'' |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
The horizontal resolution is ''n'' machine |
|
|
42 |
units. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__vert__ ''n'' |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
The vertical resolution is ''n'' machine |
|
|
49 |
units. |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
__sizescale__ ''n'' |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
The scale factor for pointsizes. By default this has a value |
|
|
56 |
of 1. One ''scaled point'' is equal to one |
|
|
57 |
point/''n''. The arguments to the __unitwidth__ and |
|
|
58 |
__sizes__ commands are given in scaled |
|
|
59 |
points. |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
__unitwidth__ ''n'' |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
Quantities in the font files are given in machine units for |
|
|
66 |
fonts whose point size is ''n'' scaled |
|
|
67 |
points. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
__prepro__ ''program'' |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
Call ''program'' as a preprocessor. |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
__postpro__ ''program'' |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
Use ''program'' as the postprocessor. |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
__tcommand__ |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
This means that the postprocessor can handle the __t__ |
|
|
86 |
and __u__ output commands. |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
__sizes__ ''s1 s2...sn'' __0__ |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
This means that the device has fonts at ''s1'', |
|
|
93 |
''s2'',...''sn'' scaled points. The list of sizes must |
|
|
94 |
be terminated by a __0__. Each __s__''i'' can also |
|
|
95 |
be a range of sizes ''m''-''n''. The list can extend |
|
|
96 |
over more than one line. |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
__styles__ ''S1 S2...Sm'' |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
The first ''m'' font positions will be associated with |
|
|
103 |
styles ''S1...Sm''. |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
__fonts__ ''n F1 F2 F3...Fn'' |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
Fonts ''F1...Fn'' will be mounted in the font positions |
|
|
110 |
''m''+1,...,''m''+''n'' where ''m'' is the |
|
|
111 |
number of styles. This command may extend over more than one |
|
|
112 |
line. A font name of __0__ will cause no font to be |
|
|
113 |
mounted on the corresponding font position. |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
__family__ ''fam'' |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
The default font family is ''fam''. |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
__use_charnames_in_special__ |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
This command indicates that troff should encode named |
|
|
126 |
characters inside special commands. |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
__pass_filenames__ |
|
|
130 |
|
|
|
131 |
|
|
|
132 |
requests that troff tells the driver the source file name |
|
|
133 |
being processed. This is achieved by another tcommand: |
|
|
134 |
__F__ ''filename''. |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
__charset__ |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
This line and everything following in the file are ignored. |
|
|
141 |
It is allowed for the sake of backwards |
|
|
142 |
compatibility. |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
__print__ ''program'' |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
Use ''program'' as the spooler program for printing. If |
|
|
149 |
omitted, the __-l__ and __-L__ options of __groff__ |
|
|
150 |
are ignored. |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
The res, unitwidth, fonts and sizes lines are compulsory. |
|
|
154 |
Other commands are ignored by __troff__ but may be used |
|
|
155 |
by postprocessors to store arbitrary information about the |
|
|
156 |
device in the DESC file. |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
Here a list of obsolete keywords which are recognized by |
|
|
160 |
__groff__ but completely ignored: __spare1__, |
|
|
161 |
__spare2__, __biggestfont__. |
|
|
162 |
|
|
|
163 |
|
|
|
164 |
__Font file format__ |
|
|
165 |
|
|
|
166 |
|
|
|
167 |
A font file has two sections. The first section is a |
|
|
168 |
sequence of lines each containing a sequence of blank |
|
|
169 |
delimited words; the first word in the line is a key, and |
|
|
170 |
subsequent words give a value for that key. |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
__name__ ''F'' |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
The name of the font is ''F''. |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
__spacewidth__ ''n'' |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
The normal width of a space is ''n''. |
|
|
183 |
|
|
|
184 |
|
|
|
185 |
__slant__ ''n'' |
|
|
186 |
|
|
|
187 |
|
|
|
188 |
The characters of the font have a slant of ''n'' degrees. |
|
|
189 |
(Positive means forward.) |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
__ligatures__ ''lig1 lig2...lign'' |
|
|
193 |
[[__0__] |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
Characters ''lig1'', ''lig2'',...,''lign'' are |
|
|
197 |
ligatures; possible ligatures are __ff__, __fi__, |
|
|
198 |
__fl__, __ffi__ and __ffl__. For backwards |
|
|
199 |
compatibility, the list of ligatures may be terminated with |
|
|
200 |
a __0.__ The list of ligatures may not extend over more |
|
|
201 |
than one line. |
|
|
202 |
|
|
|
203 |
|
|
|
204 |
__special__ |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
The font is ''special''; this means that when a character |
|
|
208 |
is requested that is not present in the current font, it |
|
|
209 |
will be searched for in any special fonts that are |
|
|
210 |
mounted. |
|
|
211 |
|
|
|
212 |
|
|
|
213 |
Other commands are ignored by __troff__ but may be used |
|
|
214 |
by postprocessors to store arbitrary information about the |
|
|
215 |
font in the font file. |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
The first section can contain comments which start with the |
|
|
219 |
__#__ character and extend to the end of a |
|
|
220 |
line. |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
The second section contains one or two subsections. It must |
|
|
224 |
contain a ''charset'' subsection and it may also contain |
|
|
225 |
a ''kernpairs'' subsection. These subsections can appear |
|
|
226 |
in any order. Each subsection starts with a word on a line |
|
|
227 |
by itself. |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
The word __charset__ starts the charset subsection. The |
|
|
231 |
__charset__ line is followed by a sequence of lines. Each |
|
|
232 |
line gives information for one character. A line comprises a |
|
|
233 |
number of fields separated by blanks or tabs. The format |
|
|
234 |
is |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
''name metrics type code'' [[''entity_name''] |
|
|
238 |
[[__--__ ''comment''] |
|
|
239 |
|
|
|
240 |
|
|
|
241 |
''name'' identifies the character: if ''name'' is a |
|
|
242 |
single character ''c'' then it corresponds to the groff |
|
|
243 |
input character ''c''; if it is of the form |
|
|
244 |
__\__''c'' where c is a single character, then it |
|
|
245 |
corresponds to the groff input character __\__''c''; |
|
|
246 |
otherwise it corresponds to the groff input character |
|
|
247 |
__[[__''name''__]__ (if it is exactly two characters |
|
|
248 |
''xx'' it can be entered as ____''xx''). Groff |
|
|
249 |
supports eight bit characters; however some utilities has |
|
|
250 |
difficulties with eight bit characters. For this reason, |
|
|
251 |
there is a convention that the name __char__''n'' is |
|
|
252 |
equivalent to the single character whose code is ''n .'' |
|
|
253 |
For example, __char163__ would be equivalent to the |
|
|
254 |
character with code 163 which is the pounds sterling sign in |
|
|
255 |
ISO Latin-1. The name __---__ is special and indicates |
|
|
256 |
that the character is unnamed; such characters can only be |
|
|
257 |
used by means of the __N__ escape sequence in |
|
|
258 |
__troff__. |
|
|
259 |
|
|
|
260 |
|
|
|
261 |
The ''type'' field gives the character type: |
|
|
262 |
|
|
|
263 |
|
|
|
264 |
1 |
|
|
265 |
|
|
|
266 |
|
|
|
267 |
means the character has an descender, for example, |
|
|
268 |
p; |
|
|
269 |
|
|
|
270 |
|
|
|
271 |
2 |
|
|
272 |
|
|
|
273 |
|
|
|
274 |
means the character has an ascender, for example, |
|
|
275 |
b; |
|
|
276 |
|
|
|
277 |
|
|
|
278 |
3 |
|
|
279 |
|
|
|
280 |
|
|
|
281 |
means the character has both an ascender and a descender, |
|
|
282 |
for example, (. |
|
|
283 |
|
|
|
284 |
|
|
|
285 |
The ''code'' field gives the code which the postprocessor |
|
|
286 |
uses to print the character. The character can also be input |
|
|
287 |
to groff using this code by means of the __N__ escape |
|
|
288 |
sequence. The code can be any integer. If it starts with a |
|
|
289 |
__0__ it will be interpreted as octal; if it starts with |
|
|
290 |
__0x__ or __0X__ it will be intepreted as |
|
|
291 |
hexadecimal. |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
The ''entity_name'' field gives an ascii string |
|
|
295 |
identifying the glyph which the postprocessor uses to print |
|
|
296 |
the character. This field is optional and has been |
|
|
297 |
introduced so that the html device driver can encode its |
|
|
298 |
character set. For example, the character `[[Po]' is |
|
|
299 |
represented as `'' |
|
|
300 |
|
|
|
301 |
|
|
|
302 |
Anything on the line after the encoding field resp. after |
|
|
303 |
`--' will be ignored. |
|
|
304 |
|
|
|
305 |
|
|
|
306 |
The ''metrics'' field has the form: |
|
|
307 |
|
|
|
308 |
|
|
|
309 |
''width''[[__,__''height''[[__,__''depth''[[__,__''italic_correction''[[__,__''left_italic_correction''[[__,__''subscript_correction'']]]]] |
|
|
310 |
|
|
|
311 |
|
|
|
312 |
There must not be any spaces between these subfields. |
|
|
313 |
Missing subfields are assumed to be 0. The subfields are all |
|
|
314 |
decimal integers. Since there is no associated binary |
|
|
315 |
format, these values are not required to fit into a variable |
|
|
316 |
of type __char__ as they are in ditroff. The ''width'' |
|
|
317 |
subfields gives the width of the character. The |
|
|
318 |
''height'' subfield gives the height of the character |
|
|
319 |
(upwards is positive); if a character does not extend above |
|
|
320 |
the baseline, it should be given a zero height, rather than |
|
|
321 |
a negative height. The ''depth'' subfield gives the depth |
|
|
322 |
of the character, that is, the distance below the lowest |
|
|
323 |
point below the baseline to which the character extends |
|
|
324 |
(downwards is positive); if a character does not extend |
|
|
325 |
below above the baseline, it should be given a zero depth, |
|
|
326 |
rather than a negative depth. The ''italic_correction'' |
|
|
327 |
subfield gives the amount of space that should be added |
|
|
328 |
after the character when it is immediately to be followed by |
|
|
329 |
a character from a roman font. The |
|
|
330 |
''left_italic_correction'' subfield gives the amount of |
|
|
331 |
space that should be added before the character when it is |
|
|
332 |
immediately to be preceded by a character from a roman font. |
|
|
333 |
The ''subscript_correction'' gives the amount of space |
|
|
334 |
that should be added after a character before adding a |
|
|
335 |
subscript. This should be less than the italic |
|
|
336 |
correction. |
|
|
337 |
|
|
|
338 |
|
|
|
339 |
A line in the charset section can also have the |
|
|
340 |
format |
|
|
341 |
|
|
|
342 |
|
|
|
343 |
''name'' ____ |
|
|
344 |
|
|
|
345 |
|
|
|
346 |
This indicates that ''name'' is just another name for the |
|
|
347 |
character mentioned in the preceding line. |
|
|
348 |
|
|
|
349 |
|
|
|
350 |
The word __kernpairs__ starts the kernpairs section. This |
|
|
351 |
contains a sequence of lines of the form: |
|
|
352 |
|
|
|
353 |
|
|
|
354 |
''c1 c2 n'' |
|
|
355 |
|
|
|
356 |
|
|
|
357 |
This means that when character ''c1'' appears next to |
|
|
358 |
character ''c2'' the space between them should be |
|
|
359 |
increased by ''n''. Most entries in kernpairs section |
|
|
360 |
will have a negative value for ''n''. |
|
|
361 |
!!FILES |
|
|
362 |
|
|
|
363 |
|
|
|
364 |
__/usr/share/groff/1.17.2/font/dev__''name''__/DESC__ |
|
|
365 |
|
|
|
366 |
|
|
|
367 |
Device description file for device ''name''. |
|
|
368 |
|
|
|
369 |
|
|
|
370 |
__/usr/share/groff/1.17.2/font/dev__''name''__/__''F'' |
|
|
371 |
|
|
|
372 |
|
|
|
373 |
Font file for font ''F'' of device |
|
|
374 |
''name''. |
|
|
375 |
!!SEE ALSO |
|
|
376 |
|
|
|
377 |
|
4 |
perry |
378 |
groff_out(5), troff(1). |
1 |
perry |
379 |
---- |