*** empty log message ***
[h316.git] / pc-tools / fontgen / src / font205.h
1 /*
2 Copyright (c) 1992 - 1994 Heinz W. Werntges. All rights reserved.
3 Parts Copyright (c) 1999 Martin Kroeker All rights reserved.
4
5 Distributed by Free Software Foundation, Inc.
6
7 This file is part of HP2xx.
8
9 HP2xx is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
11 to anyone for the consequences of using it or for whether it serves any
12 particular purpose or works at all, unless he says so in writing. Refer
13 to the GNU General Public License, Version 2 or later, for full details.
14
15 Everyone is granted permission to copy, modify and redistribute
16 HP2xx, but only under the conditions described in the GNU General Public
17 License. A copy of this license is supposed to have been
18 given to you along with HP2xx so you can know your rights and
19 responsibilities. It should be in a file named COPYING. Among other
20 things, the copyright notice and this notice must be preserved on all
21 copies.
22
23 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
24 */
25
26 /**
27 ** This file defines a standard character set by elementary
28 ** "draw" & "move" commands. The format is a very compact one from
29 ** the old days where every byte was still appreciated.
30 **
31 ** A font or character set is an array of strings. Each character
32 ** corresponds to one of these strings, which is addressed by its ASCII code.
33 **
34 ** A character is a (NULL-terminated) string of bytes. Each byte
35 ** codes for a draw or move action according to the code below:
36 **
37 ** Bit: 7 6 5 4 3 2 1 0
38 ** p x x x y y y y
39 **
40 ** p: Plot flag. If set, "draw to" new point, else "move to" it.
41 ** xxx: 3-bit unsigned integer (0...7). X coordinate of new point.
42 ** yyyy: 4-bit unsigned integer (0..15). Y coordinate of new point.
43 **
44 ** The baseline is y = 4 instead of y = 0, so characters with parts
45 ** below it can be drawn properly without a need for sign bits.
46 ** Function "code_to_ucoord()" transforms these coordinates into
47 ** actual user coordinates.
48 **
49 ** Example: code for character 'L': "\032\224\324" translates to:
50 ** moveto(1,10); drawto(1,4); drawto(5,4);
51 **
52 ** From the example you can conclude that the font below essentially is
53 ** defined on a 5x7 grid:
54 **
55 ** 0 1 2 3 4 5 6 7
56 ** 15 . . . . . . . . . : unused
57 ** 14 . . . . . . . . * : always used
58 ** 13 . . . . . . . . o : sometimes used
59 ** 12 . . . . . . . .
60 ** 11 . . . . . . . .
61 ** 10 o * * * * * . .
62 ** 9 o * * * * * . .
63 ** 8 o * * * * * . .
64 ** 7 o * * * * * . .
65 ** 6 o * * * * * . .
66 ** 5 o * * * * * . .
67 ** 4 o * * * * * . .
68 ** 3 o o o o o o . .
69 ** 2 o o o o o o . .
70 ** 1 o o o o o o . .
71 ** 0 o o o o o o . .
72 **/
73
74
75 /**
76 ** The following array of strings contains the ventura math font (205)
77 **
78 **/
79
80 char *charset205[256] = {
81 /* 0x00 ... 0x1f */
82
83 /**
84 ** Some control codes are valid in HPGL. These are handled elsewhere
85 ** in a font-independent manner, so following codes are dummies:
86 **/
87 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
88 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
89
90 /**
91 ** Unfortunately, some compilers do not process \xNN properly,
92 ** so I changed all hex codes (\xNN) into octal codes (\NNN),
93 ** thereby losing readability but gaining portability.
94 **/
95 /* 0x20 ... 0x2f */
96 "", /*space */
97 "\064\265\066\272", /*exclam */
98 "\031\264\331\047\307", /*forall */
99 "\044\252\104\312\026\326\030\330", /*hash */
100 "\031\271\265\225\067\227", /*exists */
101 "\024\332\051\250\270\271\251\066\265\305\306\266", /* percent */
102 "\124\230\231\252\271\270\226\225\244\264\326", /*ampersand */
103 "\031\251\270\267\266\225\067\227", /*ni */
104 "\132\270\266\324", /* opening brace */
105 "\024\266\270\232", /* closing brace */
106 "\005\351\145\211\072\264", /* asterisk */
107 "\065\271\027\327", /* plus */
108 "\064\244\245\265\263\242", /* comma */
109 "\027\327", /* minus */
110 "\064\244\245\265\264", /* dot */
111 "\352", /* slash */
112
113 /* 0x30 ... 0x3f */
114 "\025\244\304\325\331\312\252\231\225",
115 "\044\304\064\272\251",
116 "\031\252\312\331\330\225\224\324",
117 "\025\244\304\325\326\307\267\332\232",
118 "\112\227\226\326\107\304",
119 "\132\232\230\310\327\325\304\244\225",
120 "\132\272\230\225\244\304\325\326\307\227",
121 "\032\332\331\226\224",
122 "\107\330\331\312\252\231\230\247\307\326\325\304\244\225\226\247",
123 "\044\264\326\331\312\252\231\230\247\327",
124 "\047\250\270\267\247\045\265\264\244\245",
125 "\046\247\267\266\246\064\244\245\265\263\242",
126 "\112\227\304",
127 "\030\330\026\326",
128 "\032\307\224",
129 "\031\252\312\331\330\307\267\266\065\264",
130
131 /* 0x40 ... 0x4f */
132 "\025\325\027\327\030\251\270\310\331", /*congruent */
133 "\024\231\252\312\331\324\026\326", /* A */
134 "\024\232\312\331\330\307\227\024\304\325\326\307", /*B*/ "\024\332\124\232", /* Chi (X) */
135 "\024\272\324\224", /*Delta */
136 "\124\224\232\332\027\307", /*E*/ "\052\312\072\264\044\304\027\251\311\327\305\245\227", /*Phi */
137 "\052\332\330\072\264\044\304", /*Gamma */
138 "\024\232\124\332\027\327", /*H*/ "\024\324\064\272\032\332", /*I*/ "\027\304\330\331\271\270\326", /*vartheta */
139 "\024\232\027\247\324\047\332", /*K*/ "\024\272\324", /*Lambda */
140 "\024\232\270\332\324", /*M*/
141 "\024\232\324\332", /*N*/
142 "\044\225\231\252\312\331\325\304\244", /*O*/
143 /* 0x50 ... 0x5f */
144 "\044\252\032\332\112\304", /*Pi */
145 "\044\225\231\252\312\331\325\304\244\027\327", /*Theta */
146 "\024\232\312\331\330\307\227", /*Rho (P) */
147 "\044\252\032\332\112\304", /*Sigma */
148 "\064\272\232\332", /*T*/ "\032\231\266\264\066\331\332", /*Y*/ "\042\262\303\304\225\226\247\307", /*varsigma */
149 "\024\244\226\231\252\312\331\326\304\324", /*Omega */
150 "\031\232\332\331\050\246\047\307\110\306\025\224\324\325", /*Xi */
151 "\030\250\246\306\310\330\052\312\072\264\044\304", /*Psi */
152 "\032\332\224\324", /*Z*/ "\124\264\272\332", /*opening bracket */
153 "\004\224\225\205\204\104\324\325\305\304\051\271\272\252\251", /*point triangle */
154 "\024\264\272\232", /* closing bracket */
155 "\024\324\064\270", /*bottom */
156 "\023\323", /*underline */
157
158 /* 0x60 ... 0x6f */
159
160 "\034\334", /*overline */
161 "\025\227\250\270\307\305\264\244\225\107\330\105\324", /* alpha */
162 "\044\251\272\311\310\267\306\304\264\245", /* beta */
163 "\027\250\267\265\304\325\024\330", /* chi */
164 "\045\246\267\307\326\325\304\264\245\107\271\312\331", /*delta */
165 "\127\310\250\227\246\266\046\225\244\304\325", /* epsilon */
166 "\026\247\307\326\305\245\226\064\270", /*phi */
167 "\027\226\303\262\243\326\327", /*gamma */
168 "\030\247\270\310\327\322\047\245", /* eta */
169 "067\264\304\305", /* iota */
170 "\030\227\246\306\327\310\270\264\244", /*varphi */
171 "\050\244\046\266\330\066\305\304\324", /* kappa */
172 "\031\251\250\324\024\266", /* lambda */
173 "\024\250\246\265\306\310\106\325", /* mu */
174 "\030\226\264\326\327\310", /* nu */
175 "\044\225\227\250\270\307\305\264\244", /*o */
176
177 /* 0x70 ... 0x7f */
178 "\044\247\104\307\027\250\267\307\330", /* pi */
179 "\045\264\305\311\272\251\245\047\307", /* theta */
180 "\023\246\267\307\326\325\304\264\245", /*rho */
181 "\045\246\267\307\326\325\304\264\245\107\330", /*sigma */
182 "\026\267\327\067\264\324", /*tau */
183 "\030\226\264\326\330", /*v */
184 "\050\227\225\244\265\266\065\304\325\327\310\047\307", /*var pi */
185 "\050\227\225\244\265\266\065\304\325\327\310", /*omega */
186 "\051\250\267\307\330\270\246\265\305\326\266\244\243\262\322\321\301", /*xi */
187 "\027\247\265\305\327\110\264", /*psi */
188 "\051\250\267\307\330\270\246\244\243\262\322\321\301", /*zeta */
189 "\113\273\252\250\227\246\244\263\303", /* opening curly brace */
190 "\073\263", /* vertical bar */
191 "\053\273\312\310\327\306\304\263\243", /*closing curly brace */
192 "\027\250\267\307\330", /* similar */
193 "", /*blank */
194
195 /* 0x80 ... 0x9f */
196 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
197 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
198
199 /* 0xa0 ... 0xaf */
200 "\026\270\326\264\226", /* diamond */
201 "\026\246\264\311\331", /* root */
202 "\072\266\324", /* lower third of opening round brace */
203 "\112\272\264", /* upper third of opening bracket */
204 "\072\264", /* center part of braces and brackets */
205 "\072\264\304", /* lower third of opening bracket */
206 "\072\266\304", /* lower third of opening brace */
207 "\072\264", /* center part of braces and brackets */
208 "\044\250\104\310\027\272\327", /* up doublearrow */
209 "\025\305\027\307\070\326\264", /* right doublearrow */
210 "\052\245\112\305\026\264\326", /* down doublearrow */
211 "\125\245\226\230\251\331\045\311", /* not subset */
212 "\125\245\226\230\251\331", /* subset */
213 "\072\266\224", /* lower third of closing brace */
214 "\072\264", /* center part of braces and brackets */
215 "\072\270\307\266\264", /* center part of closing curly brace */
216
217 /* 0xb0 ... 0xbf */
218 "\027\230\251\311\330\326\305\245\226\227\046\250\270\267\247\266", /*registered */
219 "\025\305\326\330\311\231", /* superset */
220 "\026\306\327\310\230\024\324", /* supsetequal */
221 "\112\270\264", /* top third of opening brace */
222 "", /* empty */
223 "\026\247\266\245\226\066\307\326\305\266\067\250\271\310\267\067\264", /*clubsuit */
224 "\027\230\251\311\330\326\305\245\226\227\071\265\027\327", /*oplus */
225 "\027\230\251\311\330\326\305\245\226\227\045\310\050\305", /* otimes */
226 "\126\246\227\250\330\024\324", /*subsetequal */
227 "\031\226\245\305\326\331", /* cup */
228 "\027\327", /* horiz line */
229 "\024\225\064\265\124\325", /* ellipsis */
230 "\072\264", /* center part of braces and brackets */
231 "\024\267\324", /*wedge */
232 "\027\327\046\227\250\127\330", /* leftanglearrow */
233 "\026\247\266\306\327\030\251\270\310\331", /* approx */
234
235 /* 0xc0 ... 0xcf */
236 "\025\325\227\331", /*lessorequal */
237 "\026\271\326\263\226", /* diamondsuit */
238 "\125\225\327\231", /*greaterorequal */
239 "\050\271\311\305\264\244\225\226\267\306", /* partial */
240 "\024\245\247\130\307\305\030\324", /* aleph */
241 "\071\312", /* prime */
242 "\050\231\252\312\330\307\305\324\107\267\072\265\244\225", /* Re */
243 "\030\227\245\243\222\224\246\247\270\310\327\325\304\264\245", /*wp */
244 "\026\226\247\247\266\266\245\245\226\66\266\307\326\305\266", /*infinity */
245 "\026\271\326\305\267\245\226\067\264", /* spadesuit */
246 "\026\226\247\247\266\266\245\245\226\66\266\307\066\305", /* propto */
247 "\047\270\307\266\247", /* circle */
248 "\352", /* slash */
249 "\030\252\271\312\330\265\230", /* heartsuit */
250 "\045\310\050\305", /* times */
251 "\030\251\270\311\330\070\264\044\304", /* Upsilon */
252
253 /* 0xd0 ... 0xdf */
254
255 "\072\264\026\264\326", /* downarrow */
256 "\027\327\046\227\250", /* leftarrow */
257 "\027\230\251\311\330\326\305\245\226\227\046\250\270\267\247\266", /* registered */
258 "\051\252\111\312", /* two primes */
259 "\131\332\312\270\265\244\224\225\050\310", /* math function */
260 "\050\231\252\272\330\132\310\305\264\244\225", /* Im */
261 "\027\230\251\311\330\326\305\245\226\227\110\270\247\266\306", /* copyright */
262 "\065\271\027\327\025\325", /* plusminus */
263 "\027\327\106\327\310", /*rightarrow */
264 "\072\264\030\272\330", /*uparrow */
265 "\030\330\026\326\045\311", /*notequal */
266 "\025\325\027\327\031\331", /* identity */
267 "\050\251\272\311\310\267\250", /* degree */
268 "\027\327\106\327\310\046\227\250", /* leftrightarrow */
269 "\052\272\264", /* upper third of closing bracket */
270 "\024\243\264\272\313\332", /* integral */
271
272 /* 0xe0 ... 0xef */
273
274 "\072\264", /* center part of braces */
275 "\066\267", /* centered dot */
276 "\132\224\324", /* angle */
277 "\072\266\224", /* lower third of closing brace */
278 "", /* blank */
279 "\072\270\247\266\264", /* center part of opening curly brace */
280 "\112\270\264", /* top third of opening brace */
281 "\052\307\244", /* closing angle bracket */
282 "", /* blank */
283 "\026\326\325", /* neg */
284 "\032\332\264\232", /* nabla */
285 "\112\270\264", /* top third of opening brace */
286 "\072\264", /* center part of braces */
287 "\052\270\264", /* top third of closing brace */
288 "\072\266\224", /* lower third of closing brace */
289 "\027\327\065\266\071\272", /*divide */
290
291 /* 0xf0 ... 0xff */
292
293 "\024\231\124\331\031\331", /* prod */
294 "\032\272\052\250\070\272\311\332\330", /* TM */
295 "\045\325\047\327\070\226\264", /* left doublearrow */
296 "\045\305\047\307\070\226\264\070\326\264", /* leftright doublearrow */
297 "\030\264\330", /* vee */
298 "\044\252\032\332\112\304", /*Sigma */
299 "\032\272\052\250\070\272\311\332\330", /* TM */
300 "\072\264", /* center part of braces */
301 "\072\264\244", /* lower third of closing bracket */
302 "\027\251\311\327\305\245\227\024\332", /* oslash */
303 "\025\230\251\311\330\325", /* cap */
304 "\125\245\226\230\251\331\027\327", /* in */
305 "\027\230\251\311\330\326\305\245\226\227\110\270\247\266\306", /* copyright */
306 "\125\245\226\230\251\331\027\327\045\311", /* not in */
307 "\052\270\264", /* top third of closing brace */
308 "\112\247\304" /* opening angle bracket */
309 };