xref: /original-bsd/old/roff/troff_font/mkfont1.c (revision ce06cd54)
1 /*-
2  * %sccs.include.proprietary.c%
3  */
4 
5 #ifndef lint
6 static char sccsid[] = "@(#)mkfont1.c	4.4 (Berkeley) 04/18/91";
7 #endif /* not lint */
8 
9 #define BYTE 8
10 #define PAIR(a,b) ((a)|((b)<<BYTE))
11 
12 struct {
13 	int name;
14 	int ctval;
15 	} font[102] = {
16 'h',2,
17 't',2,
18 'n',0,
19 'm',0,
20 'l',2,
21 'i',2,
22 'z',0,
23 's',0,
24 'd',2,
25 'b',2,
26 'x',0,
27 'f',2,
28 'j',3,
29 'u',0,
30 'k',2,
31 'p',1,
32 PAIR('e','m'),0,
33 ';',0,
34 'a',0,
35 PAIR('r','u'),0,
36 'c',0,
37 '`',0,
38 'e',0,
39 '\'',0,
40 'o',0,
41 PAIR('1','4'),0,
42 'r',0,
43 PAIR('1','2'),0,
44 'v',0,
45 PAIR('h','y'),0,
46 'w',0,
47 'q',1,
48 '/',0,
49 '.',0,
50 'g',1,
51 PAIR('3','4'),0,
52 ',',0,
53 '&',0,
54 'y',1,
55 '%',0,
56 'Q',3,
57 'T',2,
58 'O',2,
59 'H',2,
60 'N',2,
61 'M',2,
62 'L',2,
63 'R',2,
64 'G',2,
65 'I',2,
66 'P',2,
67 'C',2,
68 'V',2,
69 'E',2,
70 'Z',2,
71 'D',2,
72 'B',2,
73 'S',2,
74 'Y',2,
75 'F',2,
76 'X',2,
77 'A',2,
78 'W',2,
79 'J',2,
80 'U',2,
81 'K',2,
82 '0',2,
83 '1',2,
84 '2',2,
85 '3',2,
86 '4',2,
87 '5',2,
88 '6',2,
89 '7',2,
90 '8',2,
91 '9',2,
92 '*',0,
93 PAIR('-','-'),0,
94 PAIR('f','i'),0,
95 PAIR('f','l'),0,
96 PAIR('f','f'),0,
97 PAIR('c','t'),0,
98 PAIR('F','l'),0,
99 PAIR('F','i'),0,
100 '(',0,
101 ')',0,
102 '[',0,
103 ']',0,
104 PAIR('d','e'),0,
105 PAIR('d','g'),0,
106 '=',0,
107 PAIR('r','g'),0,
108 ':',0,
109 '+',0,
110 '!',0,
111 PAIR('b','u'),0,
112 '?',0,
113 PAIR('f','m'),0,
114 '|',0,
115 PAIR('c','o'),0,
116 PAIR('s','q'),0,
117 '$',0};
118 char *nametab[256-32] = {
119 "/*space*/",
120 "/*!*/",
121 "/*\"*/",
122 "/*#*/",
123 "/*$*/",
124 "/*%*/",
125 "/*&*/",
126 "/*' close*/",
127 "/*(*/",
128 "/*)*/",
129 "/***/",
130 "/*+*/",
131 "/*,*/",
132 "/*- hyphen*/",
133 "/*.*/",
134 "/*/*/",
135 "/*0*/",
136 "/*1*/",
137 "/*2*/",
138 "/*3*/",
139 "/*4*/",
140 "/*5*/",
141 "/*6*/",
142 "/*7*/",
143 "/*8*/",
144 "/*9*/",
145 "/*:*/",
146 "/*;*/",
147 "/*<*/",
148 "/*=*/",
149 "/*>*/",
150 "/*?*/",
151 "/*@*/",
152 "/*A*/",
153 "/*B*/",
154 "/*C*/",
155 "/*D*/",
156 "/*E*/",
157 "/*F*/",
158 "/*G*/",
159 "/*H*/",
160 "/*I*/",
161 "/*J*/",
162 "/*K*/",
163 "/*L*/",
164 "/*M*/",
165 "/*N*/",
166 "/*O*/",
167 "/*P*/",
168 "/*Q*/",
169 "/*R*/",
170 "/*S*/",
171 "/*T*/",
172 "/*U*/",
173 "/*V*/",
174 "/*W*/",
175 "/*X*/",
176 "/*Y*/",
177 "/*Z*/",
178 "/*[*/",
179 "/*\\*/",
180 "/*]*/",
181 "/*^*/",
182 "/*_*/",
183 "/*` open*/",
184 "/*a*/",
185 "/*b*/",
186 "/*c*/",
187 "/*d*/",
188 "/*e*/",
189 "/*f*/",
190 "/*g*/",
191 "/*h*/",
192 "/*i*/",
193 "/*j*/",
194 "/*k*/",
195 "/*l*/",
196 "/*m*/",
197 "/*n*/",
198 "/*o*/",
199 "/*p*/",
200 "/*q*/",
201 "/*r*/",
202 "/*s*/",
203 "/*t*/",
204 "/*u*/",
205 "/*v*/",
206 "/*w*/",
207 "/*x*/",
208 "/*y*/",
209 "/*z*/",
210 "/*{*/",
211 "/*|*/",
212 "/*}*/",
213 "/*~*/",
214 "/*narrow space*/",
215 "/*hyphen*/",
216 "/*bullet*/",
217 "/*square*/",
218 "/*3/4 em*/",
219 "/*rule*/",
220 "/*1/4*/",
221 "/*1/2*/",
222 "/*3/4*/",
223 "/*minus*/",
224 "/*fi*/",
225 "/*fl*/",
226 "/*ff*/",
227 "/*ffi*/",
228 "/*ffl*/",
229 "/*degree*/",
230 "/*dagger*/",
231 "/*section*/",
232 "/*foot mark*/",
233 "/*'*/",
234 "/*`*/",
235 "/*_*/",
236 0,
237 "/*half nar sp*/",
238 0,
239 0,0,0,0,0,0,0,0,
240 0,0,0,0,0,0,0,0,
241 0,0,0,0,0,0,0,0,
242 0,0,0,0,0,0,0,0,
243 0,0,0,0,0,0,0,0,
244 0,0,0,0,0,0,0,0,
245 0,0,0,0,0,0,0,0,
246 0,0,0,0,0,0,0,0,
247 0,0,0,0,0,
248 "/*registered*/",
249 "/*copywrite*/",
250 0,
251 "/*cent*/",
252 };
253 int chtab [] = {
254 PAIR('-','-'), 0210,	/*font minus*/
255 PAIR('h','y'), 0200,	/*hyphen*/
256 PAIR('b','u'), 0201,	/*bullet*/
257 PAIR('s','q'), 0202,	/*square*/
258 PAIR('e','m'), 0203,	/*3/4em*/
259 PAIR('r','u'), 0204,	/*rule*/
260 PAIR('1','4'), 0205,	/*1/4*/
261 PAIR('1','2'), 0206,	/*1/2*/
262 PAIR('3','4'), 0207,	/*3/4*/
263 PAIR('m','i'), 0302,	/*equation minus*/
264 PAIR('f','i'), 0211,	/*fi*/
265 PAIR('f','l'), 0212,	/*fl*/
266 PAIR('f','f'), 0213,	/*ff*/
267 PAIR('F','i'), 0214,	/*ffi*/
268 PAIR('F','l'), 0215,	/*ffl*/
269 PAIR('d','e'), 0216,	/*degree*/
270 PAIR('d','g'), 0217,	/*dagger*/
271 PAIR('s','c'), 0220,	/*section*/
272 PAIR('f','m'), 0221,	/*foot mark*/
273 PAIR('a','a'), 0222,	/*acute accent*/
274 PAIR('g','a'), 0223,	/*grave accent*/
275 PAIR('u','l'), 0224,	/*underrule*/
276 PAIR('s','l'), 0225,	/*slash (longer)*/
277 PAIR('*','a'), 0230,	/*alpha*/
278 PAIR('*','b'), 0231,	/*beta*/
279 PAIR('*','g'), 0232,	/*gamma*/
280 PAIR('*','d'), 0233,	/*delta*/
281 PAIR('*','e'), 0234,	/*epsilon*/
282 PAIR('*','z'), 0235,	/*zeta*/
283 PAIR('*','y'), 0236,	/*eta*/
284 PAIR('*','h'), 0237,	/*theta*/
285 PAIR('*','i'), 0240,	/*iota*/
286 PAIR('*','k'), 0241,	/*kappa*/
287 PAIR('*','l'), 0242,	/*lambda*/
288 PAIR('*','m'), 0243,	/*mu*/
289 PAIR('*','n'), 0244,	/*nu*/
290 PAIR('*','c'), 0245,	/*xi*/
291 PAIR('*','o'), 0246,	/*omicron*/
292 PAIR('*','p'), 0247,	/*pi*/
293 PAIR('*','r'), 0250,	/*rho*/
294 PAIR('*','s'), 0251,	/*sigma*/
295 PAIR('*','t'), 0252,	/*tau*/
296 PAIR('*','u'), 0253,	/*upsilon*/
297 PAIR('*','f'), 0254,	/*phi*/
298 PAIR('*','x'), 0255,	/*chi*/
299 PAIR('*','q'), 0256,	/*psi*/
300 PAIR('*','w'), 0257,	/*omega*/
301 PAIR('*','A'), 0101,	/*Alpha*/
302 PAIR('*','B'), 0102,	/*Beta*/
303 PAIR('*','G'), 0260,	/*Gamma*/
304 PAIR('*','D'), 0261,	/*Delta*/
305 PAIR('*','E'), 0105,	/*Epsilon*/
306 PAIR('*','Z'), 0132,	/*Zeta*/
307 PAIR('*','Y'), 0110,	/*Eta*/
308 PAIR('*','H'), 0262,	/*Theta*/
309 PAIR('*','I'), 0111,	/*Iota*/
310 PAIR('*','K'), 0113,	/*Kappa*/
311 PAIR('*','L'), 0263,	/*Lambda*/
312 PAIR('*','M'), 0115,	/*Mu*/
313 PAIR('*','N'), 0116,	/*Nu*/
314 PAIR('*','C'), 0264,	/*Xi*/
315 PAIR('*','O'), 0117,	/*Omicron*/
316 PAIR('*','P'), 0265,	/*Pi*/
317 PAIR('*','R'), 0120,	/*Rho*/
318 PAIR('*','S'), 0266,	/*Sigma*/
319 PAIR('*','T'), 0124,	/*Tau*/
320 PAIR('*','U'), 0270,	/*Upsilon*/
321 PAIR('*','F'), 0271,	/*Phi*/
322 PAIR('*','X'), 0130,	/*Chi*/
323 PAIR('*','Q'), 0272,	/*Psi*/
324 PAIR('*','W'), 0273,	/*Omega*/
325 PAIR('s','r'), 0274,	/*square root*/
326 PAIR('t','s'), 0275,	/*terminal sigma*/
327 PAIR('r','n'), 0276,	/*root en*/
328 PAIR('>','='), 0277,	/*>=*/
329 PAIR('<','='), 0300,	/*<=*/
330 PAIR('=','='), 0301,	/*identically equal*/
331 PAIR('~','='), 0303,	/*approx =*/
332 PAIR('a','p'), 0304,	/*approximates*/
333 PAIR('!','='), 0305,	/*not equal*/
334 PAIR('-','>'), 0306,	/*right arrow*/
335 PAIR('<','-'), 0307,	/*left arrow*/
336 PAIR('u','a'), 0310,	/*up arrow*/
337 PAIR('d','a'), 0311,	/*down arrow*/
338 PAIR('e','q'), 0312,	/*equation equal*/
339 PAIR('m','u'), 0313,	/*multiply*/
340 PAIR('d','i'), 0314,	/*divide*/
341 PAIR('+','-'), 0315,	/*plus-minus*/
342 PAIR('c','u'), 0316,	/*cup (union)*/
343 PAIR('c','a'), 0317,	/*cap (intersection)*/
344 PAIR('s','b'), 0320,	/*subset of*/
345 PAIR('s','p'), 0321,	/*superset of*/
346 PAIR('i','b'), 0322,	/*improper subset*/
347 PAIR('i','p'), 0323,	/*  " superset*/
348 PAIR('i','f'), 0324,	/*infinity*/
349 PAIR('p','d'), 0325,	/*partial derivative*/
350 PAIR('g','r'), 0326,	/*gradient*/
351 PAIR('n','o'), 0327,	/*not*/
352 PAIR('i','s'), 0330,	/*integral sign*/
353 PAIR('p','t'), 0331,	/*proportional to*/
354 PAIR('e','s'), 0332,	/*empty set*/
355 PAIR('m','o'), 0333,	/*member of*/
356 PAIR('p','l'), 0334,	/*equation plus*/
357 PAIR('r','g'), 0335,	/*registered*/
358 PAIR('c','o'), 0336,	/*copyright*/
359 PAIR('b','r'), 0337,	/*box vert rule*/
360 PAIR('c','t'), 0340,	/*cent sign*/
361 PAIR('d','d'), 0341,	/*dbl dagger*/
362 PAIR('r','h'), 0342,	/*right hand*/
363 PAIR('l','h'), 0343,	/*left hand*/
364 PAIR('*','*'), 0344,	/*math * */
365 PAIR('b','s'), 0345,	/*bell system sign*/
366 PAIR('o','r'), 0346,	/*or*/
367 PAIR('c','i'), 0347,	/*circle*/
368 PAIR('l','t'), 0350,	/*left top (of big curly)*/
369 PAIR('l','b'), 0351,	/*left bottom*/
370 PAIR('r','t'), 0352,	/*right top*/
371 PAIR('r','b'), 0353,	/*right bot*/
372 PAIR('l','k'), 0354,	/*left center of big curly bracket*/
373 PAIR('r','k'), 0355,	/*right center of big curly bracket*/
374 PAIR('b','v'), 0356,	/*bold vertical*/
375 PAIR('l','f'), 0357,	/*left floor (left bot of big sq bract)*/
376 PAIR('r','f'), 0360,	/*right floor (rb of ")*/
377 PAIR('l','c'), 0361,	/*left ceiling (lt of ")*/
378 PAIR('r','c'), 0362,	/*right ceiling (rt of ")*/
379 0,0};
380