Commit | Line | Data |
---|---|---|
be77c7fe C |
1 | |
2 | ||
3 | ||
4 | GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@) | |
5 | ||
6 | ||
7 | N\bNA\bAM\bME\bE | |
8 | groff_font - format of groff device and font description | |
9 | files | |
10 | ||
11 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
12 | The groff font format is roughly a superset of the ditroff | |
13 | font format. Unlike the ditroff font format, there is no | |
14 | associated binary format. The font files for device _\bn_\ba_\bm_\be | |
15 | are stored in a directory d\bde\bev\bv_\bn_\ba_\bm_\be_\b. There are two types of | |
16 | file: a device description file called D\bDE\bES\bSC\bC and for each | |
17 | font _\bF a font file called _\bF. These are text files; there | |
18 | is no associated binary format. | |
19 | ||
20 | D\bDE\bES\bSC\bC f\bfi\bil\ble\be f\bfo\bor\brm\bma\bat\bt | |
21 | The DESC file can contain the following types of line: | |
22 | ||
23 | r\bre\bes\bs _\bn There are _\bn machine units per inch. | |
24 | ||
25 | h\bho\bor\br _\bn The horizontal resolution is _\bn machine units. | |
26 | ||
27 | v\bve\ber\brt\bt _\bn The vertical resolution is _\bn machine units. | |
28 | ||
29 | s\bsi\biz\bze\bes\bsc\bca\bal\ble\be _\bn | |
30 | The scale factor for pointsizes. By default this | |
31 | has a value of 1. One _\bs_\bc_\ba_\bl_\be_\bd _\bp_\bo_\bi_\bn_\bt is equal to one | |
32 | point/_\bn. The arguments to the u\bun\bni\bit\btw\bwi\bid\bdt\bth\bh and s\bsi\biz\bze\bes\bs | |
33 | commands are given in scaled points. | |
34 | ||
35 | u\bun\bni\bit\btw\bwi\bid\bdt\bth\bh _\bn | |
36 | Quantities in the font files are given in machine | |
37 | units for fonts whose point size is _\bn scaled | |
38 | points. | |
39 | ||
40 | t\btc\bco\bom\bmm\bma\ban\bnd\bd | |
41 | This means that the postprocessor can handle the t\bt | |
42 | and u\bu output commands. | |
43 | ||
44 | s\bsi\biz\bze\bes\bs _\bs_\b1 _\bs_\b2_\b._\b._\b._\bs_\bn 0\b0 | |
45 | This means that the device has fonts at _\bs_\b1, | |
46 | _\bs_\b2,..._\bs_\bn scaled points. The list of sizes must be | |
47 | terminated by a 0\b0. Each s\bs_\bi can also be a range of | |
48 | sizes _\bm-_\bn. The list can extend over more than one | |
49 | line. | |
50 | ||
51 | s\bst\bty\byl\ble\bes\bs _\bS_\b1 _\bS_\b2_\b._\b._\b._\bS_\bm | |
52 | The first _\bm font positions will be associated with | |
53 | styles _\bS_\b1_\b._\b._\b._\bS_\bm. | |
54 | ||
55 | f\bfo\bon\bnt\bts\bs _\bn _\bF_\b1 _\bF_\b2 _\bF_\b3_\b._\b._\b._\bF_\bn | |
56 | Fonts _\bF_\b1_\b._\b._\b._\bF_\bn will be mounted in the font positions | |
57 | _\bm+1,...,_\bm+_\bn where _\bm is the number of styles. This | |
58 | ||
59 | ||
60 | ||
61 | Groff Version @VERSION@ @MDATE@ 1 | |
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@) | |
71 | ||
72 | ||
73 | command may extend over more than one line. A font | |
74 | name of 0\b0 will cause no font to be mounted on the | |
75 | corresponding font position. | |
76 | ||
77 | f\bfa\bam\bmi\bil\bly\by _\bf_\ba_\bm | |
78 | The default font family is _\bf_\ba_\bm. | |
79 | ||
80 | c\bch\bha\bar\brs\bse\bet\bt | |
81 | This line and everything following in the file are | |
82 | ignored. It is allowed for the sake of backwards | |
83 | compatibility. | |
84 | ||
85 | The res, unitwidth, fonts and sizes lines are compulsory. | |
86 | Other commands are ignored by t\btr\bro\bof\bff\bf but may be used by | |
87 | postprocessors to store arbitrary information about the | |
88 | device in the DESC file. | |
89 | ||
90 | F\bFo\bon\bnt\bt f\bfi\bil\ble\be f\bfo\bor\brm\bma\bat\bt | |
91 | A font file has two sections. The first section is a | |
92 | sequence of lines each containing a sequence of blank | |
93 | delimited words; the first word in the line is a key, and | |
94 | subsequent words give a value for that key. | |
95 | ||
96 | n\bna\bam\bme\be _\bF The name of the font is _\bF. | |
97 | ||
98 | s\bsp\bpa\bac\bce\bew\bwi\bid\bdt\bth\bh _\bn | |
99 | The normal width of a space is _\bn. | |
100 | ||
101 | s\bsl\bla\ban\bnt\bt _\bn | |
102 | The characters of the font have a slant of _\bn | |
103 | degrees. (Positive means forward.) | |
104 | ||
105 | l\bli\big\bga\bat\btu\bur\bre\bes\bs _\bl_\bi_\bg_\b1 _\bl_\bi_\bg_\b2_\b._\b._\b._\bl_\bi_\bg_\bn [0\b0] | |
106 | Characters _\bl_\bi_\bg_\b1, _\bl_\bi_\bg_\b2,...,_\bl_\bi_\bg_\bn are ligatures; pos- | |
107 | sible ligatures are f\bff\bf, f\bfi\bi, f\bfl\bl and f\bff\bfl\bl. For back- | |
108 | wards compatibiliy, the list of ligatures may be | |
109 | terminated with a 0\b0.\b. The list of ligatures may not | |
110 | extend over more than one line. | |
111 | ||
112 | s\bsp\bpe\bec\bci\bia\bal\bl | |
113 | The font is _\bs_\bp_\be_\bc_\bi_\ba_\bl; this means that when a charac- | |
114 | ter is requested that is not present in the current | |
115 | font, it will be searched for in any special fonts | |
116 | that are mounted. | |
117 | ||
118 | Other commands are ignored by t\btr\bro\bof\bff\bf but may be used by | |
119 | postprocessors to store arbitrary information about the | |
120 | font in the font file. | |
121 | ||
122 | The first section can contain comments which start with | |
123 | the #\b# character and extend to the end of a line. | |
124 | ||
125 | ||
126 | ||
127 | Groff Version @VERSION@ @MDATE@ 2 | |
128 | ||
129 | ||
130 | ||
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@) | |
137 | ||
138 | ||
139 | The second section contains one or two subsections. It | |
140 | must contain a _\bc_\bh_\ba_\br_\bs_\be_\bt subsection and it may also contain | |
141 | a _\bk_\be_\br_\bn_\bp_\ba_\bi_\br_\bs subsection. These subsections can appear in | |
142 | any order. Each subsection starts with a word on a line | |
143 | by itself. | |
144 | ||
145 | The word c\bch\bha\bar\brs\bse\bet\bt starts the charset subsection. The | |
146 | c\bch\bha\bar\brs\bse\bet\bt line is followed by a sequence of lines. Each | |
147 | line gives information for one character. A line com- | |
148 | prises a number of fields separated by blanks or tabs. The | |
149 | format is | |
150 | ||
151 | _\bn_\ba_\bm_\be _\bm_\be_\bt_\br_\bi_\bc_\bs _\bt_\by_\bp_\be _\bc_\bo_\bd_\be _\bc_\bo_\bm_\bm_\be_\bn_\bt | |
152 | ||
153 | _\bn_\ba_\bm_\be identifies the character: if _\bn_\ba_\bm_\be is a single charac- | |
154 | ter _\bc then it corresponds to the groff input character _\bc; | |
155 | if it is of the form \\b\_\bc where c is a single character, | |
156 | then it corresponds to the groff input character \\b\_\bc; oth- | |
157 | erwise it corresponds to the groff input character \\b\[\b[_\bn_\ba_\bm_\be]\b] | |
158 | (if it is exactly two characters _\bx_\bx it can be entered as | |
159 | \\b\(\b(_\bx_\bx.) Groff supports eight bit characters; however some | |
160 | utilities has difficulties with eight bit characters. For | |
161 | this reason, there is a convention that the name c\bch\bha\bar\br_\bn is | |
162 | equivalent to the single character whose code is _\bn _\b. For | |
163 | example, c\bch\bha\bar\br1\b16\b63\b3 would be equivalent to the character with | |
164 | code 163 which is the pounds sterling sign in ISO Latin-1. | |
165 | The name -\b--\b--\b- is special and indicates that the character | |
166 | is unnamed; such characters can only be used by means of | |
167 | the \\b\N\bN escape sequence in t\btr\bro\bof\bff\bf. | |
168 | ||
169 | The _\bt_\by_\bp_\be field gives the character type: | |
170 | ||
171 | 1 means the character has an descender, for example, | |
172 | p; | |
173 | ||
174 | 2 means the character has an ascender, for example, | |
175 | b; | |
176 | ||
177 | 3 means the character has both an ascender and a | |
178 | descender, for example, (. | |
179 | ||
180 | The _\bc_\bo_\bd_\be field gives the code which the postprocessor uses | |
181 | to print the character. The character can also be input | |
182 | to groff using this code by means of the \\b\N\bN escape | |
183 | sequence. The code can be any integer. If it starts with | |
184 | a 0\b0 it will be interpreted as octal; if it starts with 0\b0x\bx | |
185 | or 0\b0X\bX it will be intepreted as hexdecimal. | |
186 | ||
187 | Anything on the line after the code field will be ignored. | |
188 | ||
189 | The _\bm_\be_\bt_\br_\bi_\bc_\bs field has the form: | |
190 | ||
191 | ||
192 | ||
193 | Groff Version @VERSION@ @MDATE@ 3 | |
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@) | |
203 | ||
204 | ||
205 | _\bw_\bi_\bd_\bt_\bh[,\b,_\bh_\be_\bi_\bg_\bh_\bt[,\b,_\bd_\be_\bp_\bt_\bh[,\b,_\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn[,\b,_\bl_\be_\bf_\bt_\b__\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn[,\b,_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn]]]]] | |
206 | ||
207 | There must not be any spaces between these subfields. | |
208 | Missing subfields are assumed to be 0. The subfields are | |
209 | all decimal integers. Since there is no associated binary | |
210 | format, these values are not required to fit into a vari- | |
211 | able of type c\bch\bha\bar\br as they are in ditroff. The _\bw_\bi_\bd_\bt_\bh sub- | |
212 | fields gives the width of the character. The _\bh_\be_\bi_\bg_\bh_\bt sub- | |
213 | field gives the height of the character (upwards is posi- | |
214 | tive); if a character does not extend above the baseline, | |
215 | it should be given a zero height, rather than a negative | |
216 | height. The _\bd_\be_\bp_\bt_\bh subfield gives the depth of the charac- | |
217 | ter, that is, the distance below the lowest point below | |
218 | the baseline to which the character extends (downwards is | |
219 | positive); if a character does not extend below above the | |
220 | baseline, it should be given a zero depth, rather than a | |
221 | negative depth. The _\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn subfield gives the | |
222 | amount of space that should be added after the character | |
223 | when it is immediately to be followed by a character from | |
224 | a roman font. The _\bl_\be_\bf_\bt_\b__\bi_\bt_\ba_\bl_\bi_\bc_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn subfield gives | |
225 | the amount of space that should be added before the char- | |
226 | acter when it is immediately to be preceded by a character | |
227 | from a roman font. The _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt_\b__\bc_\bo_\br_\br_\be_\bc_\bt_\bi_\bo_\bn gives the | |
228 | amount of space that should be added after a character | |
229 | before adding a subscript. This should be less than the | |
230 | italic correction. | |
231 | ||
232 | A line in the charset section can also have the format | |
233 | ||
234 | _\bn_\ba_\bm_\be "\b" | |
235 | ||
236 | This indicates that _\bn_\ba_\bm_\be is just another name for the | |
237 | character mentioned in the preceding line. | |
238 | ||
239 | The word k\bke\ber\brn\bnp\bpa\bai\bir\brs\bs starts the kernpairs section. This | |
240 | contains a sequence of lines of the form: | |
241 | ||
242 | _\bc_\b1 _\bc_\b2 _\bn | |
243 | ||
244 | This means that when character _\bc_\b1 appears next to charac- | |
245 | ter _\bc_\b2 the space between them should be increased by _\bn. | |
246 | Most entries in kernpairs section will have a negative | |
247 | value for _\bn. | |
248 | ||
249 | F\bFI\bIL\bLE\bES\bS | |
250 | @\b@F\bFO\bON\bNT\bTD\bDI\bIR\bR@\b@/\b/d\bde\bev\bv_\bn_\ba_\bm_\be/\b/D\bDE\bES\bSC\bC Device description file for | |
251 | device _\bn_\ba_\bm_\be. | |
252 | ||
253 | @\b@F\bFO\bON\bNT\bTD\bDI\bIR\bR@\b@/\b/d\bde\bev\bv_\bn_\ba_\bm_\be/\b/_\bF Font file for font _\bF of device | |
254 | _\bn_\ba_\bm_\be. | |
255 | ||
256 | ||
257 | ||
258 | ||
259 | Groff Version @VERSION@ @MDATE@ 4 | |
260 | ||
261 | ||
262 | ||
263 | ||
264 | ||
265 | ||
266 | ||
267 | ||
268 | GROFF_FONT(@MAN5EXT@) BSD Reference Manual GROFF_FONT(@MAN5EXT@) | |
269 | ||
270 | ||
271 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
272 | g\bgr\bro\bof\bff\bf_\b_o\bou\but\bt(@MAN5EXT@), @\b@g\bg@\b@t\btr\bro\bof\bff\bf(@MAN1EXT@). | |
273 | ||
274 | ||
275 | ||
276 | ||
277 | ||
278 | ||
279 | ||
280 | ||
281 | ||
282 | ||
283 | ||
284 | ||
285 | ||
286 | ||
287 | ||
288 | ||
289 | ||
290 | ||
291 | ||
292 | ||
293 | ||
294 | ||
295 | ||
296 | ||
297 | ||
298 | ||
299 | ||
300 | ||
301 | ||
302 | ||
303 | ||
304 | ||
305 | ||
306 | ||
307 | ||
308 | ||
309 | ||
310 | ||
311 | ||
312 | ||
313 | ||
314 | ||
315 | ||
316 | ||
317 | ||
318 | ||
319 | ||
320 | ||
321 | ||
322 | ||
323 | ||
324 | ||
325 | Groff Version @VERSION@ @MDATE@ 5 | |
326 | ||
327 | ||
328 | ||
329 | ||
330 |