1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,1826 @@ |
1 |
+//============================================================================== |
|
2 |
+// Copyright 2011 Meta Watch Ltd. - http://www.MetaWatch.org/ |
|
3 |
+// |
|
4 |
+// Licensed under the Meta Watch License, Version 1.0 (the "License"); |
|
5 |
+// you may not use this file except in compliance with the License. |
|
6 |
+// You may obtain a copy of the License at |
|
7 |
+// |
|
8 |
+// http://www.MetaWatch.org/licenses/license-1.0.html |
|
9 |
+// |
|
10 |
+// Unless required by applicable law or agreed to in writing, software |
|
11 |
+// distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
+// See the License for the specific language governing permissions and |
|
14 |
+// limitations under the License. |
|
15 |
+//============================================================================== |
|
16 |
+ |
|
17 |
+#include <stdio.h> |
|
18 |
+#include "Fonts.h" |
|
19 |
+ |
|
20 |
+/*! The number of printable characters in the font tables */ |
|
21 |
+#define PRINTABLE_CHARACTERS ( 94 ) |
|
22 |
+ |
|
23 |
+const unsigned char MetaWatch5table[PRINTABLE_CHARACTERS][5]; |
|
24 |
+const unsigned char MetaWatch7table[PRINTABLE_CHARACTERS][7]; |
|
25 |
+const unsigned int MetaWatch16table[PRINTABLE_CHARACTERS][16]; |
|
26 |
+const unsigned int MetaWatchTimeTable[TOTAL_TIME_CHARACTERS][19]; |
|
27 |
+ |
|
28 |
+const unsigned char MetaWatch5width[PRINTABLE_CHARACTERS]; |
|
29 |
+const unsigned char MetaWatch7width[PRINTABLE_CHARACTERS]; |
|
30 |
+const unsigned char MetaWatch16width[PRINTABLE_CHARACTERS]; |
|
31 |
+const unsigned char MetaWatchTimeWidth[TOTAL_TIME_CHARACTERS]; |
|
32 |
+ |
|
33 |
+/*! Font Structure |
|
34 |
+ * |
|
35 |
+ * \param Type is the enumerated type of font |
|
36 |
+ * \param Height |
|
37 |
+ * \param Spacing is the horizontal spacing that should be inserted when |
|
38 |
+ * drawing characters |
|
39 |
+ */ |
|
40 |
+typedef struct |
|
41 |
+{ |
|
42 |
+ etFontType Type; |
|
43 |
+ unsigned char Height; |
|
44 |
+ unsigned char Spacing; |
|
45 |
+} tFont; |
|
46 |
+ |
|
47 |
+static tFont CurrentFont; |
|
48 |
+ |
|
49 |
+void SetFont(etFontType Type) |
|
50 |
+{ |
|
51 |
+ switch (Type) |
|
52 |
+ { |
|
53 |
+ case MetaWatch5: |
|
54 |
+ CurrentFont.Type = Type; |
|
55 |
+ CurrentFont.Height = 5; |
|
56 |
+ CurrentFont.Spacing = 1; |
|
57 |
+ break; |
|
58 |
+ |
|
59 |
+ case MetaWatch7: |
|
60 |
+ CurrentFont.Type = Type; |
|
61 |
+ CurrentFont.Height = 7; |
|
62 |
+ CurrentFont.Spacing = 1; |
|
63 |
+ break; |
|
64 |
+ |
|
65 |
+ case MetaWatch16: |
|
66 |
+ CurrentFont.Type = Type; |
|
67 |
+ CurrentFont.Height = 16; |
|
68 |
+ CurrentFont.Spacing = 1; |
|
69 |
+ break; |
|
70 |
+ |
|
71 |
+ case MetaWatchTime: |
|
72 |
+ CurrentFont.Type = Type; |
|
73 |
+ CurrentFont.Height = 19; |
|
74 |
+ CurrentFont.Spacing = 1; |
|
75 |
+ break; |
|
76 |
+ |
|
77 |
+ default: |
|
78 |
+ printf("Undefined Font Selected\r\n"); |
|
79 |
+ break; |
|
80 |
+ } |
|
81 |
+} |
|
82 |
+ |
|
83 |
+unsigned char MapDigitToIndex(unsigned char Digit) |
|
84 |
+{ |
|
85 |
+ /* default is a space (the first printable character) */ |
|
86 |
+ return (Digit < 10 ? Digit + 0x10 : 0); |
|
87 |
+} |
|
88 |
+ |
|
89 |
+ |
|
90 |
+unsigned char GetCharacterWidth(unsigned char Character) |
|
91 |
+{ |
|
92 |
+ unsigned char index = MapCharacterToIndex(Character); |
|
93 |
+ unsigned char Width = 0; |
|
94 |
+ |
|
95 |
+ switch (CurrentFont.Type) |
|
96 |
+ { |
|
97 |
+ case MetaWatch5: Width = MetaWatch5width[index]; break; |
|
98 |
+ case MetaWatch7: Width = MetaWatch7width[index]; break; |
|
99 |
+ case MetaWatch16: Width = MetaWatch16width[index]; break; |
|
100 |
+ case MetaWatchTime: Width = MetaWatchTimeWidth[index]; break; |
|
101 |
+ default : |
|
102 |
+ break; |
|
103 |
+ } |
|
104 |
+ |
|
105 |
+ return Width; |
|
106 |
+ |
|
107 |
+} |
|
108 |
+ |
|
109 |
+unsigned char GetCharacterHeight(void) |
|
110 |
+{ |
|
111 |
+ return CurrentFont.Height; |
|
112 |
+} |
|
113 |
+ |
|
114 |
+void SetFontSpacing(unsigned char Spacing) |
|
115 |
+{ |
|
116 |
+ CurrentFont.Spacing = Spacing; |
|
117 |
+} |
|
118 |
+ |
|
119 |
+unsigned char GetFontSpacing(void) |
|
120 |
+{ |
|
121 |
+ return CurrentFont.Spacing; |
|
122 |
+} |
|
123 |
+ |
|
124 |
+unsigned char MapCharacterToIndex(unsigned char CharIn) |
|
125 |
+{ |
|
126 |
+ unsigned char Result = 0; |
|
127 |
+ |
|
128 |
+ switch (CurrentFont.Type) |
|
129 |
+ { |
|
130 |
+ case MetaWatchTime: |
|
131 |
+ Result = CharIn; |
|
132 |
+ break; |
|
133 |
+ |
|
134 |
+ default : |
|
135 |
+ // space = 0x20 and 0x7f = delete character |
|
136 |
+ if ( (CharIn >= 0x20) && (CharIn < 0x7f) ) |
|
137 |
+ { |
|
138 |
+ Result = CharIn - 0x20; |
|
139 |
+ } |
|
140 |
+ break; |
|
141 |
+ } |
|
142 |
+ |
|
143 |
+ return Result; |
|
144 |
+ |
|
145 |
+} |
|
146 |
+ |
|
147 |
+ |
|
148 |
+void GetCharacterBitmap(unsigned char Character,unsigned int * pBitmap) |
|
149 |
+{ |
|
150 |
+ unsigned char index = MapCharacterToIndex(Character); |
|
151 |
+ |
|
152 |
+ unsigned char row; |
|
153 |
+ for (row = 0; row < CurrentFont.Height; row++ ) |
|
154 |
+ { |
|
155 |
+ switch (CurrentFont.Type) |
|
156 |
+ { |
|
157 |
+ case MetaWatch5: |
|
158 |
+ pBitmap[row] = (unsigned int)MetaWatch5table[index][row]; |
|
159 |
+ break; |
|
160 |
+ |
|
161 |
+ case MetaWatch7: |
|
162 |
+ pBitmap[row] = (unsigned int)MetaWatch7table[index][row]; |
|
163 |
+ break; |
|
164 |
+ |
|
165 |
+ case MetaWatch16: |
|
166 |
+ pBitmap[row] = MetaWatch16table[index][row]; |
|
167 |
+ break; |
|
168 |
+ |
|
169 |
+ case MetaWatchTime: |
|
170 |
+ pBitmap[row] = MetaWatchTimeTable[index][row]; |
|
171 |
+ break; |
|
172 |
+ |
|
173 |
+ default: |
|
174 |
+ break; |
|
175 |
+ } |
|
176 |
+ |
|
177 |
+ } |
|
178 |
+ |
|
179 |
+} |
|
180 |
+ |
|
181 |
+const unsigned char MetaWatch5table[PRINTABLE_CHARACTERS][5] = |
|
182 |
+{ |
|
183 |
+ /* character 0x20 (' '): (width = 2) */ |
|
184 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
185 |
+ |
|
186 |
+ /* character 0x21 ('!'): (width=1) */ |
|
187 |
+ 0x01, 0x01, 0x01, 0x00, 0x01, |
|
188 |
+ |
|
189 |
+ /* character 0x22 ('"'): (width=3) */ |
|
190 |
+ 0x05, 0x05, 0x00, 0x00, 0x00, |
|
191 |
+ |
|
192 |
+ /* character 0x23 ('#'): (width=5) */ |
|
193 |
+ 0x0A, 0x1F, 0x0A, 0x1F, 0x0A, |
|
194 |
+ |
|
195 |
+ /* character 0x24 ('$'): (width=3) */ |
|
196 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
197 |
+ |
|
198 |
+ /* character 0x25 ('%'): (width=3) */ |
|
199 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
200 |
+ |
|
201 |
+ /* character 0x26 ('&'): (width=5) */ |
|
202 |
+ 0x02, 0x05, 0x16, 0x09, 0x1E, |
|
203 |
+ |
|
204 |
+ /* character 0x27 ('''): (width=1) */ |
|
205 |
+ 0x01, 0x01, 0x00, 0x00, 0x00, |
|
206 |
+ |
|
207 |
+ /* character 0x28 ('('): (width=2) */ |
|
208 |
+ 0x02, 0x01, 0x01, 0x01, 0x02, |
|
209 |
+ |
|
210 |
+ /* character 0x29 (')'): (width=2) */ |
|
211 |
+ 0x01, 0x02, 0x02, 0x02, 0x01, |
|
212 |
+ |
|
213 |
+ /* character 0x2A ('*'): (width=5) */ |
|
214 |
+ 0x0A, 0x04, 0x1F, 0x04, 0x0A, |
|
215 |
+ |
|
216 |
+ /* character 0x2B ('+'): (width=5) */ |
|
217 |
+ 0x04, 0x04, 0x1F, 0x04, 0x04, |
|
218 |
+ |
|
219 |
+ /* character 0x2C (','): (width=1) */ |
|
220 |
+ 0x00, 0x00, 0x00, 0x01, 0x01, |
|
221 |
+ |
|
222 |
+ /* character 0x2D ('-'): (width=3) */ |
|
223 |
+ 0x00, 0x00, 0x07, 0x00, 0x00, |
|
224 |
+ |
|
225 |
+ /* character 0x2E ('.'): (width=1) */ |
|
226 |
+ 0x00, 0x00, 0x00, 0x00, 0x01, |
|
227 |
+ |
|
228 |
+ /* character 0x2F ('/'): (width=5) */ |
|
229 |
+ 0x10, 0x08, 0x04, 0x02, 0x01, |
|
230 |
+ |
|
231 |
+ /* character 0x30 ('0'): (width=4) */ |
|
232 |
+ 0x06, 0x09, 0x09, 0x09, 0x06, |
|
233 |
+ |
|
234 |
+ /* character 0x31 ('1'): (width=3) */ |
|
235 |
+ 0x03, 0x02, 0x02, 0x02, 0x07, |
|
236 |
+ |
|
237 |
+ /* character 0x32 ('2'): (width=4) */ |
|
238 |
+ 0x06, 0x09, 0x04, 0x02, 0x0F, |
|
239 |
+ |
|
240 |
+ /* character 0x33 ('3'): (width=4) */ |
|
241 |
+ 0x0F, 0x08, 0x06, 0x08, 0x07, |
|
242 |
+ |
|
243 |
+ /* character 0x34 ('4'): (width=4) */ |
|
244 |
+ 0x04, 0x06, 0x05, 0x0F, 0x04, |
|
245 |
+ |
|
246 |
+ /* character 0x35 ('5'): (width=4) */ |
|
247 |
+ 0x0F, 0x01, 0x0F, 0x08, 0x07, |
|
248 |
+ |
|
249 |
+ /* character 0x36 ('6'): (width=4) */ |
|
250 |
+ 0x06, 0x01, 0x07, 0x09, 0x06, |
|
251 |
+ |
|
252 |
+ /* character 0x37 ('7'): (width=4) */ |
|
253 |
+ 0x0F, 0x08, 0x04, 0x02, 0x02, |
|
254 |
+ |
|
255 |
+ /* character 0x38 ('8'): (width=4) */ |
|
256 |
+ 0x06, 0x09, 0x06, 0x09, 0x06, |
|
257 |
+ |
|
258 |
+ /* character 0x39 ('9'): (width=4) */ |
|
259 |
+ 0x06, 0x09, 0x0E, 0x08, 0x06, |
|
260 |
+ |
|
261 |
+ /* character 0x3A (':'): (width=1) */ |
|
262 |
+ 0x00, 0x01, 0x00, 0x01, 0x00, |
|
263 |
+ |
|
264 |
+ /* character 0x3B (';'): (width=2) */ |
|
265 |
+ 0x00, 0x02, 0x00, 0x02, 0x01, |
|
266 |
+ |
|
267 |
+ /* character 0x3C ('<'): (width=3) */ |
|
268 |
+ 0x04, 0x02, 0x01, 0x02, 0x04, |
|
269 |
+ |
|
270 |
+ /* character 0x3D ('='): (width=4) */ |
|
271 |
+ 0x00, 0x0F, 0x00, 0x0F, 0x00, |
|
272 |
+ |
|
273 |
+ /* character 0x3E ('>'): (width=3) */ |
|
274 |
+ 0x01, 0x02, 0x04, 0x02, 0x01, |
|
275 |
+ |
|
276 |
+ /* character 0x3F ('?'): (width=3) */ |
|
277 |
+ 0x03, 0x04, 0x02, 0x00, 0x02, |
|
278 |
+ |
|
279 |
+ /* character 0x40 ('@'): (width=3) */ |
|
280 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
281 |
+ |
|
282 |
+ /* character 0x41 ('A'): (width=5) */ |
|
283 |
+ 0x04, 0x04, 0x0A, 0x0E, 0x11, |
|
284 |
+ |
|
285 |
+ /* character 0x42 ('B'): (width=4) */ |
|
286 |
+ 0x07, 0x09, 0x07, 0x09, 0x07, |
|
287 |
+ |
|
288 |
+ /* character 0x43 ('C'): (width=4) */ |
|
289 |
+ 0x06, 0x09, 0x01, 0x09, 0x06, |
|
290 |
+ |
|
291 |
+ /* character 0x44 ('D'): (width=4) */ |
|
292 |
+ 0x07, 0x09, 0x09, 0x09, 0x07, |
|
293 |
+ |
|
294 |
+ /* character 0x45 ('E'): (width=4) */ |
|
295 |
+ 0x0F, 0x01, 0x07, 0x01, 0x0F, |
|
296 |
+ |
|
297 |
+ /* character 0x46 ('F'): (width=4) */ |
|
298 |
+ 0x0F, 0x01, 0x07, 0x01, 0x01, |
|
299 |
+ |
|
300 |
+ /* character 0x47 ('G'): (width=4) */ |
|
301 |
+ 0x06, 0x01, 0x0D, 0x09, 0x06, |
|
302 |
+ |
|
303 |
+ /* character 0x48 ('H'): (width=4) */ |
|
304 |
+ 0x09, 0x09, 0x0F, 0x09, 0x09, |
|
305 |
+ |
|
306 |
+ /* character 0x49 ('I'): (width=3) */ |
|
307 |
+ 0x07, 0x02, 0x02, 0x02, 0x07, |
|
308 |
+ |
|
309 |
+ /* character 0x4A ('J'): (width=4) */ |
|
310 |
+ 0x08, 0x08, 0x08, 0x09, 0x06, |
|
311 |
+ |
|
312 |
+ /* character 0x4B ('K'): (width=4) */ |
|
313 |
+ 0x09, 0x05, 0x03, 0x05, 0x09, |
|
314 |
+ |
|
315 |
+ /* character 0x4C ('L'): (width=4) */ |
|
316 |
+ 0x01, 0x01, 0x01, 0x01, 0x0F, |
|
317 |
+ |
|
318 |
+ /* character 0x4D ('M'): (width=5) */ |
|
319 |
+ 0x11, 0x1B, 0x15, 0x11, 0x11, |
|
320 |
+ |
|
321 |
+ /* character 0x4E ('N'): (width=5) */ |
|
322 |
+ 0x11, 0x13, 0x15, 0x19, 0x11, |
|
323 |
+ |
|
324 |
+ /* character 0x4F ('O'): (width=4) */ |
|
325 |
+ 0x06, 0x09, 0x09, 0x09, 0x06, |
|
326 |
+ |
|
327 |
+ /* character 0x50 ('P'): (width=4) */ |
|
328 |
+ 0x07, 0x09, 0x07, 0x01, 0x01, |
|
329 |
+ |
|
330 |
+ /* character 0x51 ('Q'): (width=5) */ |
|
331 |
+ 0x06, 0x09, 0x09, 0x09, 0x1E, |
|
332 |
+ |
|
333 |
+ /* character 0x52 ('R'): (width=4) */ |
|
334 |
+ 0x07, 0x09, 0x07, 0x09, 0x09, |
|
335 |
+ |
|
336 |
+ /* character 0x53 ('S'): (width=4) */ |
|
337 |
+ 0x0E, 0x01, 0x06, 0x08, 0x07, |
|
338 |
+ |
|
339 |
+ /* character 0x54 ('T'): (width=3) */ |
|
340 |
+ 0x07, 0x02, 0x02, 0x02, 0x02, |
|
341 |
+ |
|
342 |
+ /* character 0x55 ('U'): (width=4) */ |
|
343 |
+ 0x09, 0x09, 0x09, 0x09, 0x06, |
|
344 |
+ |
|
345 |
+ /* character 0x56 ('V'): (width=5) */ |
|
346 |
+ 0x11, 0x0A, 0x0A, 0x04, 0x04, |
|
347 |
+ |
|
348 |
+ /* character 0x57 ('W'): (width=5) */ |
|
349 |
+ 0x15, 0x15, 0x0A, 0x0A, 0x0A, |
|
350 |
+ |
|
351 |
+ /* character 0x58 ('X'): (width=4) */ |
|
352 |
+ 0x09, 0x09, 0x06, 0x09, 0x09, |
|
353 |
+ |
|
354 |
+ /* character 0x59 ('Y'): (width=5) */ |
|
355 |
+ 0x11, 0x0A, 0x04, 0x04, 0x04, |
|
356 |
+ |
|
357 |
+ /* character 0x5A ('Z'): (width=4) */ |
|
358 |
+ 0x0F, 0x04, 0x02, 0x01, 0x0F, |
|
359 |
+ |
|
360 |
+ /* character 0x5B ('['): (width=2) */ |
|
361 |
+ 0x03, 0x01, 0x01, 0x01, 0x03, |
|
362 |
+ |
|
363 |
+ /* character 0x5C ('\'): (width=5) */ |
|
364 |
+ 0x01, 0x02, 0x04, 0x08, 0x10, |
|
365 |
+ |
|
366 |
+ /* character 0x5D (']'): (width=2) */ |
|
367 |
+ 0x03, 0x02, 0x02, 0x02, 0x03, |
|
368 |
+ |
|
369 |
+ /* character 0x5E ('^'): (width=5) */ |
|
370 |
+ 0x04, 0x0A, 0x11, 0x00, 0x00, |
|
371 |
+ |
|
372 |
+ /* character 0x5F ('_'): (width=4) */ |
|
373 |
+ 0x00, 0x00, 0x00, 0x00, 0x0F, |
|
374 |
+ |
|
375 |
+ /* character 0x60 ('`'): (width=1) */ |
|
376 |
+ 0x01, 0x01, 0x00, 0x00, 0x00, |
|
377 |
+ |
|
378 |
+ /* character 0x61 ('a'): (width=5) */ |
|
379 |
+ 0x04, 0x04, 0x0A, 0x0E, 0x11, |
|
380 |
+ |
|
381 |
+ /* character 0x62 ('b'): (width=4) */ |
|
382 |
+ 0x07, 0x09, 0x07, 0x09, 0x07, |
|
383 |
+ |
|
384 |
+ /* character 0x63 ('c'): (width=4) */ |
|
385 |
+ 0x06, 0x09, 0x01, 0x09, 0x06, |
|
386 |
+ |
|
387 |
+ /* character 0x64 ('d'): (width=4) */ |
|
388 |
+ 0x07, 0x09, 0x09, 0x09, 0x07, |
|
389 |
+ |
|
390 |
+ /* character 0x65 ('e'): (width=4) */ |
|
391 |
+ 0x0F, 0x01, 0x07, 0x01, 0x0F, |
|
392 |
+ |
|
393 |
+ /* character 0x66 ('f'): (width=4) */ |
|
394 |
+ 0x0F, 0x01, 0x07, 0x01, 0x01, |
|
395 |
+ |
|
396 |
+ /* character 0x67 ('g'): (width=4) */ |
|
397 |
+ 0x06, 0x01, 0x0D, 0x09, 0x06, |
|
398 |
+ |
|
399 |
+ /* character 0x68 ('h'): (width=4) */ |
|
400 |
+ 0x09, 0x09, 0x0F, 0x09, 0x09, |
|
401 |
+ |
|
402 |
+ /* character 0x69 ('i'): (width=3) */ |
|
403 |
+ 0x07, 0x02, 0x02, 0x02, 0x07, |
|
404 |
+ |
|
405 |
+ /* character 0x6A ('j'): (width=4) */ |
|
406 |
+ 0x08, 0x08, 0x08, 0x09, 0x06, |
|
407 |
+ |
|
408 |
+ /* character 0x6B ('k'): (width=4) */ |
|
409 |
+ 0x09, 0x05, 0x03, 0x05, 0x09, |
|
410 |
+ |
|
411 |
+ /* character 0x6C ('l'): (width=4) */ |
|
412 |
+ 0x01, 0x01, 0x01, 0x01, 0x0F, |
|
413 |
+ |
|
414 |
+ /* character 0x6D ('m'): (width=5) */ |
|
415 |
+ 0x11, 0x1B, 0x15, 0x11, 0x11, |
|
416 |
+ |
|
417 |
+ /* character 0x6E ('n'): (width=5) */ |
|
418 |
+ 0x11, 0x13, 0x15, 0x19, 0x11, |
|
419 |
+ |
|
420 |
+ /* character 0x6F ('o'): (width=4) */ |
|
421 |
+ 0x06, 0x09, 0x09, 0x09, 0x06, |
|
422 |
+ |
|
423 |
+ /* character 0x70 ('p'): (width=4) */ |
|
424 |
+ 0x07, 0x09, 0x07, 0x01, 0x01, |
|
425 |
+ |
|
426 |
+ /* character 0x71 ('q'): (width=5) */ |
|
427 |
+ 0x06, 0x09, 0x09, 0x09, 0x1E, |
|
428 |
+ |
|
429 |
+ /* character 0x72 ('r'): (width=4) */ |
|
430 |
+ 0x07, 0x09, 0x07, 0x09, 0x09, |
|
431 |
+ |
|
432 |
+ /* character 0x73 ('s'): (width=4) */ |
|
433 |
+ 0x0E, 0x01, 0x06, 0x08, 0x07, |
|
434 |
+ |
|
435 |
+ /* character 0x74 ('t'): (width=3) */ |
|
436 |
+ 0x07, 0x02, 0x02, 0x02, 0x02, |
|
437 |
+ |
|
438 |
+ /* character 0x75 ('u'): (width=4) */ |
|
439 |
+ 0x09, 0x09, 0x09, 0x09, 0x06, |
|
440 |
+ |
|
441 |
+ /* character 0x76 ('v'): (width=5) */ |
|
442 |
+ 0x11, 0x0A, 0x0A, 0x04, 0x04, |
|
443 |
+ |
|
444 |
+ /* character 0x77 ('w'): (width=5) */ |
|
445 |
+ 0x15, 0x15, 0x0A, 0x0A, 0x0A, |
|
446 |
+ |
|
447 |
+ /* character 0x78 ('x'): (width=4) */ |
|
448 |
+ 0x09, 0x09, 0x06, 0x09, 0x09, |
|
449 |
+ |
|
450 |
+ /* character 0x79 ('y'): (width=5) */ |
|
451 |
+ 0x11, 0x0A, 0x04, 0x04, 0x04, |
|
452 |
+ |
|
453 |
+ /* character 0x7A ('z'): (width=4) */ |
|
454 |
+ 0x0F, 0x04, 0x02, 0x01, 0x0F, |
|
455 |
+ |
|
456 |
+ /* character 0x7B ('{'): (width=3) */ |
|
457 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
458 |
+ |
|
459 |
+ /* character 0x7C ('|'): (width=1) */ |
|
460 |
+ 0x01, 0x01, 0x01, 0x01, 0x01, |
|
461 |
+ |
|
462 |
+ /* character 0x7D ('}'): (width=3) */ |
|
463 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, |
|
464 |
+}; |
|
465 |
+ |
|
466 |
+const unsigned char MetaWatch5width[PRINTABLE_CHARACTERS] = |
|
467 |
+{ |
|
468 |
+/* width char hexcode */ |
|
469 |
+/* ===== ==== ======= */ |
|
470 |
+ 2, /* ' ' 20 */ |
|
471 |
+ 1, /* ! 21 */ |
|
472 |
+ 3, /* " 22 */ |
|
473 |
+ 5, /* # 23 */ |
|
474 |
+ 3, /* $ 24 */ |
|
475 |
+ 3, /* % 25 */ |
|
476 |
+ 5, /* & 26 */ |
|
477 |
+ 1, /* ' 27 */ |
|
478 |
+ 2, /* ( 28 */ |
|
479 |
+ 2, /* ) 29 */ |
|
480 |
+ 5, /* * 2A */ |
|
481 |
+ 5, /* + 2B */ |
|
482 |
+ 1, /* , 2C */ |
|
483 |
+ 3, /* - 2D */ |
|
484 |
+ 1, /* . 2E */ |
|
485 |
+ 5, /* / 2F */ |
|
486 |
+ 4, /* 0 30 */ |
|
487 |
+ 3, /* 1 31 */ |
|
488 |
+ 4, /* 2 32 */ |
|
489 |
+ 4, /* 3 33 */ |
|
490 |
+ 4, /* 4 34 */ |
|
491 |
+ 4, /* 5 35 */ |
|
492 |
+ 4, /* 6 36 */ |
|
493 |
+ 4, /* 7 37 */ |
|
494 |
+ 4, /* 8 38 */ |
|
495 |
+ 4, /* 9 39 */ |
|
496 |
+ 1, /* : 3A */ |
|
497 |
+ 2, /* ; 3B */ |
|
498 |
+ 3, /* < 3C */ |
|
499 |
+ 4, /* = 3D */ |
|
500 |
+ 3, /* > 3E */ |
|
501 |
+ 3, /* ? 3F */ |
|
502 |
+ 3, /* @ 40 */ |
|
503 |
+ 5, /* A 41 */ |
|
504 |
+ 4, /* B 42 */ |
|
505 |
+ 4, /* C 43 */ |
|
506 |
+ 4, /* D 44 */ |
|
507 |
+ 4, /* E 45 */ |
|
508 |
+ 4, /* F 46 */ |
|
509 |
+ 4, /* G 47 */ |
|
510 |
+ 4, /* H 48 */ |
|
511 |
+ 3, /* I 49 */ |
|
512 |
+ 4, /* J 4A */ |
|
513 |
+ 4, /* K 4B */ |
|
514 |
+ 4, /* L 4C */ |
|
515 |
+ 5, /* M 4D */ |
|
516 |
+ 5, /* N 4E */ |
|
517 |
+ 4, /* O 4F */ |
|
518 |
+ 4, /* P 50 */ |
|
519 |
+ 5, /* Q 51 */ |
|
520 |
+ 4, /* R 52 */ |
|
521 |
+ 4, /* S 53 */ |
|
522 |
+ 3, /* T 54 */ |
|
523 |
+ 4, /* U 55 */ |
|
524 |
+ 5, /* V 56 */ |
|
525 |
+ 5, /* W 57 */ |
|
526 |
+ 4, /* X 58 */ |
|
527 |
+ 5, /* Y 59 */ |
|
528 |
+ 4, /* Z 5A */ |
|
529 |
+ 2, /* [ 5B */ |
|
530 |
+ 5, /* \ 5C */ |
|
531 |
+ 2, /* ] 5D */ |
|
532 |
+ 5, /* ^ 5E */ |
|
533 |
+ 4, /* _ 5F */ |
|
534 |
+ 1, /* ` 60 */ |
|
535 |
+ 5, /* a 61 */ |
|
536 |
+ 4, /* b 62 */ |
|
537 |
+ 4, /* c 63 */ |
|
538 |
+ 4, /* d 64 */ |
|
539 |
+ 4, /* e 65 */ |
|
540 |
+ 4, /* f 66 */ |
|
541 |
+ 4, /* g 67 */ |
|
542 |
+ 4, /* h 68 */ |
|
543 |
+ 3, /* i 69 */ |
|
544 |
+ 4, /* j 6A */ |
|
545 |
+ 4, /* k 6B */ |
|
546 |
+ 4, /* l 6C */ |
|
547 |
+ 5, /* m 6D */ |
|
548 |
+ 5, /* n 6E */ |
|
549 |
+ 4, /* o 6F */ |
|
550 |
+ 4, /* p 70 */ |
|
551 |
+ 5, /* q 71 */ |
|
552 |
+ 4, /* r 72 */ |
|
553 |
+ 4, /* s 73 */ |
|
554 |
+ 3, /* t 74 */ |
|
555 |
+ 4, /* u 75 */ |
|
556 |
+ 5, /* v 76 */ |
|
557 |
+ 5, /* w 77 */ |
|
558 |
+ 4, /* x 78 */ |
|
559 |
+ 5, /* y 79 */ |
|
560 |
+ 4, /* z 7A */ |
|
561 |
+ 3, /* { 7B */ |
|
562 |
+ 1, /* | 7C */ |
|
563 |
+ 3, /* } 7D */ |
|
564 |
+}; |
|
565 |
+ |
|
566 |
+const unsigned char MetaWatch7table[PRINTABLE_CHARACTERS][7] = |
|
567 |
+{ |
|
568 |
+ |
|
569 |
+ /* character 0x20 (' '): (width = 2) */ |
|
570 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
|
571 |
+ |
|
572 |
+ /* character 0x21 ('!'): (width=1) */ |
|
573 |
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, |
|
574 |
+ |
|
575 |
+ /* character 0x22 ('"'): (width=3) */ |
|
576 |
+ 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, |
|
577 |
+ |
|
578 |
+ /* character 0x23 ('#'): (width=7) */ |
|
579 |
+ 0x00, 0x28, 0x7E, 0x14, 0x3F, 0x0A, 0x00, |
|
580 |
+ |
|
581 |
+ /* character 0x24 ('$'): (width=5) */ |
|
582 |
+ 0x04, 0x1E, 0x05, 0x0E, 0x14, 0x0F, 0x04, |
|
583 |
+ |
|
584 |
+ /* character 0x25 ('%'): (width=7) */ |
|
585 |
+ 0x42, 0x25, 0x15, 0x2A, 0x54, 0x52, 0x21, |
|
586 |
+ |
|
587 |
+ /* character 0x26 ('&'): (width=5) */ |
|
588 |
+ 0x02, 0x05, 0x05, 0x02, 0x15, 0x09, 0x16, |
|
589 |
+ |
|
590 |
+ /* character 0x27 ('''): (width=3) */ |
|
591 |
+ 0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, |
|
592 |
+ |
|
593 |
+ /* character 0x28 ('('): (width=3) */ |
|
594 |
+ 0x04, 0x02, 0x01, 0x01, 0x01, 0x02, 0x04, |
|
595 |
+ |
|
596 |
+ /* character 0x29 (')'): (width=3) */ |
|
597 |
+ 0x01, 0x02, 0x04, 0x04, 0x04, 0x02, 0x01, |
|
598 |
+ |
|
599 |
+ /* character 0x2A ('*'): (width=7) */ |
|
600 |
+ 0x08, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, |
|
601 |
+ |
|
602 |
+ /* character 0x2B ('+'): (width=5) */ |
|
603 |
+ 0x00, 0x04, 0x04, 0x1F, 0x04, 0x04, 0x00, |
|
604 |
+ |
|
605 |
+ /* character 0x2C (','): (width=1) */ |
|
606 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, |
|
607 |
+ |
|
608 |
+ /* character 0x2D ('-'): (width=4) */ |
|
609 |
+ 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, |
|
610 |
+ |
|
611 |
+ /* character 0x2E ('.'): (width=1) */ |
|
612 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, |
|
613 |
+ |
|
614 |
+ /* character 0x2F ('/'): (width=4) */ |
|
615 |
+ 0x08, 0x08, 0x04, 0x06, 0x02, 0x01, 0x01, |
|
616 |
+ |
|
617 |
+ /* character 0x30 ('0'): (width=4) */ |
|
618 |
+ 0x06, 0x09, 0x09, 0x09, 0x09, 0x09, 0x06, |
|
619 |
+ |
|
620 |
+ /* character 0x31 ('1'): (width=2) */ |
|
621 |
+ 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, |
|
622 |
+ |
|
623 |
+ /* character 0x32 ('2'): (width=4) */ |
|
624 |
+ 0x06, 0x09, 0x08, 0x04, 0x02, 0x01, 0x0F, |
|
625 |
+ |
|
626 |
+ /* character 0x33 ('3'): (width=4) */ |
|
627 |
+ 0x06, 0x09, 0x08, 0x06, 0x08, 0x09, 0x06, |
|
628 |
+ |
|
629 |
+ /* character 0x34 ('4'): (width=5) */ |
|
630 |
+ 0x04, 0x04, 0x0A, 0x09, 0x1F, 0x08, 0x08, |
|
631 |
+ |
|
632 |
+ /* character 0x35 ('5'): (width=4) */ |
|
633 |
+ 0x0F, 0x01, 0x07, 0x08, 0x08, 0x09, 0x06, |
|
634 |
+ |
|
635 |
+ /* character 0x36 ('6'): (width=4) */ |
|
636 |
+ 0x06, 0x01, 0x07, 0x09, 0x09, 0x09, 0x06, |
|
637 |
+ |
|
638 |
+ /* character 0x37 ('7'): (width=4) */ |
|
639 |
+ 0x0F, 0x08, 0x04, 0x04, 0x02, 0x02, 0x02, |
|
640 |
+ |
|
641 |
+ /* character 0x38 ('8'): (width=4) */ |
|
642 |
+ 0x06, 0x09, 0x09, 0x06, 0x09, 0x09, 0x06, |
|
643 |
+ |
|
644 |
+ /* character 0x39 ('9'): (width=4) */ |
|
645 |
+ 0x06, 0x09, 0x09, 0x09, 0x0E, 0x08, 0x06, |
|
646 |
+ |
|
647 |
+ /* character 0x3A (':'): (width=1) */ |
|
648 |
+ 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, |
|
649 |
+ |
|
650 |
+ /* character 0x3B (';'): (width=1) */ |
|
651 |
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, |
|
652 |
+ |
|
653 |
+ /* character 0x3C ('<'): (width=3) */ |
|
654 |
+ 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, |
|
655 |
+ |
|
656 |
+ /* character 0x3D ('='): (width=4) */ |
|
657 |
+ 0x00, 0x00, 0x0F, 0x00, 0x0F, 0x00, 0x00, |
|
658 |
+ |
|
659 |
+ /* character 0x3E ('>'): (width=3) */ |
|
660 |
+ 0x00, 0x01, 0x02, 0x04, 0x02, 0x01, 0x00, |
|
661 |
+ |
|
662 |
+ /* character 0x3F ('?'): (width=4) */ |
|
663 |
+ 0x07, 0x08, 0x04, 0x02, 0x02, 0x00, 0x02, |
|
664 |
+ |
|
665 |
+ /* character 0x40 ('@'): (width=7) */ |
|
666 |
+ 0x3C, 0x42, 0x59, 0x55, 0x39, 0x02, 0x3C, |
|
667 |
+ |
|
668 |
+ /* character 0x41 ('A'): (width=7) */ |
|
669 |
+ 0x08, 0x08, 0x14, 0x14, 0x3E, 0x22, 0x41, |
|
670 |
+ |
|
671 |
+ /* character 0x42 ('B'): (width=5) */ |
|
672 |
+ 0x0F, 0x11, 0x11, 0x0F, 0x11, 0x11, 0x0F, |
|
673 |
+ |
|
674 |
+ /* character 0x43 ('C'): (width=5) */ |
|
675 |
+ 0x0C, 0x12, 0x01, 0x01, 0x01, 0x12, 0x0C, |
|
676 |
+ |
|
677 |
+ /* character 0x44 ('D'): (width=5) */ |
|
678 |
+ 0x07, 0x09, 0x11, 0x11, 0x11, 0x09, 0x07, |
|
679 |
+ |
|
680 |
+ /* character 0x45 ('E'): (width=4) */ |
|
681 |
+ 0x0F, 0x01, 0x01, 0x07, 0x01, 0x01, 0x0F, |
|
682 |
+ |
|
683 |
+ /* character 0x46 ('F'): (width=4) */ |
|
684 |
+ 0x0F, 0x01, 0x01, 0x07, 0x01, 0x01, 0x01, |
|
685 |
+ |
|
686 |
+ /* character 0x47 ('G'): (width=6) */ |
|
687 |
+ 0x0C, 0x12, 0x01, 0x39, 0x21, 0x12, 0x0C, |
|
688 |
+ |
|
689 |
+ /* character 0x48 ('H'): (width=5) */ |
|
690 |
+ 0x11, 0x11, 0x11, 0x1F, 0x11, 0x11, 0x11, |
|
691 |
+ |
|
692 |
+ /* character 0x49 ('I'): (width=3) */ |
|
693 |
+ 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x07, |
|
694 |
+ |
|
695 |
+ /* character 0x4A ('J'): (width=5) */ |
|
696 |
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0E, |
|
697 |
+ |
|
698 |
+ /* character 0x4B ('K'): (width=5) */ |
|
699 |
+ 0x11, 0x09, 0x05, 0x03, 0x05, 0x09, 0x11, |
|
700 |
+ |
|
701 |
+ /* character 0x4C ('L'): (width=4) */ |
|
702 |
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, |
|
703 |
+ |
|
704 |
+ /* character 0x4D ('M'): (width=7) */ |
|
705 |
+ 0x41, 0x63, 0x63, 0x55, 0x55, 0x49, 0x49, |
|
706 |
+ |
|
707 |
+ /* character 0x4E ('N'): (width=6) */ |
|
708 |
+ 0x21, 0x23, 0x25, 0x2D, 0x29, 0x31, 0x21, |
|
709 |
+ |
|
710 |
+ /* character 0x4F ('O'): (width=6) */ |
|
711 |
+ 0x0C, 0x12, 0x21, 0x21, 0x21, 0x12, 0x0C, |
|
712 |
+ |
|
713 |
+ /* character 0x50 ('P'): (width=4) */ |
|
714 |
+ 0x07, 0x09, 0x09, 0x07, 0x01, 0x01, 0x01, |
|
715 |
+ |
|
716 |
+ /* character 0x51 ('Q'): (width=7) */ |
|
717 |
+ 0x0C, 0x12, 0x21, 0x21, 0x21, 0x12, 0x6C, |
|
718 |
+ |
|
719 |
+ /* character 0x52 ('R'): (width=5) */ |
|
720 |
+ 0x0F, 0x11, 0x11, 0x0F, 0x09, 0x11, 0x11, |
|
721 |
+ |
|
722 |
+ /* character 0x53 ('S'): (width=4) */ |
|
723 |
+ 0x06, 0x09, 0x01, 0x06, 0x08, 0x09, 0x06, |
|
724 |
+ |
|
725 |
+ /* character 0x54 ('T'): (width=5) */ |
|
726 |
+ 0x1F, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, |
|
727 |
+ |
|
728 |
+ /* character 0x55 ('U'): (width=5) */ |
|
729 |
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0E, |
|
730 |
+ |
|
731 |
+ /* character 0x56 ('V'): (width=7) */ |
|
732 |
+ 0x41, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, |
|
733 |
+ |
|
734 |
+ /* character 0x57 ('W'): (width=7) */ |
|
735 |
+ 0x49, 0x49, 0x49, 0x55, 0x55, 0x22, 0x22, |
|
736 |
+ |
|
737 |
+ /* character 0x58 ('X'): (width=5) */ |
|
738 |
+ 0x11, 0x1B, 0x0A, 0x04, 0x0A, 0x1B, 0x11, |
|
739 |
+ |
|
740 |
+ /* character 0x59 ('Y'): (width=7) */ |
|
741 |
+ 0x41, 0x22, 0x14, 0x08, 0x08, 0x08, 0x08, |
|
742 |
+ |
|
743 |
+ /* character 0x5A ('Z'): (width=5) */ |
|
744 |
+ 0x1F, 0x10, 0x08, 0x04, 0x02, 0x01, 0x1F, |
|
745 |
+ |
|
746 |
+ /* character 0x5B ('['): (width=3) */ |
|
747 |
+ 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, |
|
748 |
+ |
|
749 |
+ /* character 0x5C ('\'): (width=4) */ |
|
750 |
+ 0x01, 0x01, 0x02, 0x06, 0x04, 0x08, 0x08, |
|
751 |
+ |
|
752 |
+ /* character 0x5D (']'): (width=3) */ |
|
753 |
+ 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x07, |
|
754 |
+ |
|
755 |
+ /* character 0x5E ('^'): (width=5) */ |
|
756 |
+ 0x04, 0x0A, 0x11, 0x00, 0x00, 0x00, 0x00, |
|
757 |
+ |
|
758 |
+ /* character 0x5F ('_'): (width=5) */ |
|
759 |
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, |
|
760 |
+ |
|
761 |
+ /* character 0x60 ('`'): (width=1) */ |
|
762 |
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, |
|
763 |
+ |
|
764 |
+ /* character 0x61 ('a'): (width=7) */ |
|
765 |
+ 0x08, 0x08, 0x14, 0x14, 0x3E, 0x22, 0x41, |
|
766 |
+ |
|
767 |
+ /* character 0x62 ('b'): (width=5) */ |
|
768 |
+ 0x0F, 0x11, 0x11, 0x0F, 0x11, 0x11, 0x0F, |
|
769 |
+ |
|
770 |
+ /* character 0x63 ('c'): (width=5) */ |
|
771 |
+ 0x0C, 0x12, 0x01, 0x01, 0x01, 0x12, 0x0C, |
|
772 |
+ |
|
773 |
+ /* character 0x64 ('d'): (width=5) */ |
|
774 |
+ 0x07, 0x09, 0x11, 0x11, 0x11, 0x09, 0x07, |
|
775 |
+ |
|
776 |
+ /* character 0x65 ('e'): (width=4) */ |
|
777 |
+ 0x0F, 0x01, 0x01, 0x07, 0x01, 0x01, 0x0F, |
|
778 |
+ |
|
779 |
+ /* character 0x66 ('f'): (width=4) */ |
|
780 |
+ 0x0F, 0x01, 0x01, 0x07, 0x01, 0x01, 0x01, |
|
781 |
+ |
|
782 |
+ /* character 0x67 ('g'): (width=6) */ |
|
783 |
+ 0x0C, 0x12, 0x01, 0x39, 0x21, 0x12, 0x0C, |
|
784 |
+ |
|
785 |
+ /* character 0x68 ('h'): (width=5) */ |
|
786 |
+ 0x11, 0x11, 0x11, 0x1F, 0x11, 0x11, 0x11, |
|
787 |
+ |
|
788 |
+ /* character 0x69 ('i'): (width=3) */ |
|
789 |
+ 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x07, |
|
790 |
+ |
|
791 |
+ /* character 0x6A ('j'): (width=5) */ |
|
792 |
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0E, |
|
793 |
+ |
|
794 |
+ /* character 0x6B ('k'): (width=5) */ |
|
795 |
+ 0x11, 0x09, 0x05, 0x03, 0x05, 0x09, 0x11, |
|
796 |
+ |
|
797 |
+ /* character 0x6C ('l'): (width=4) */ |
|
798 |
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, |
|
799 |
+ |
|
800 |
+ /* character 0x6D ('m'): (width=7) */ |
|
801 |
+ 0x41, 0x63, 0x63, 0x55, 0x55, 0x49, 0x49, |
|
802 |
+ |
|
803 |
+ /* character 0x6E ('n'): (width=6) */ |
|
804 |
+ 0x21, 0x23, 0x25, 0x2D, 0x29, 0x31, 0x21, |
|
805 |
+ |
|
806 |
+ /* character 0x6F ('o'): (width=6) */ |
|
807 |
+ 0x0C, 0x12, 0x21, 0x21, 0x21, 0x12, 0x0C, |
|
808 |
+ |
|
809 |
+ /* character 0x70 ('p'): (width=4) */ |
|
810 |
+ 0x07, 0x09, 0x09, 0x07, 0x01, 0x01, 0x01, |
|
811 |
+ |
|
812 |
+ /* character 0x71 ('q'): (width=7) */ |
|
813 |
+ 0x0C, 0x12, 0x21, 0x21, 0x21, 0x12, 0x6C, |
|
814 |
+ |
|
815 |
+ /* character 0x72 ('r'): (width=5) */ |
|
816 |
+ 0x0F, 0x11, 0x11, 0x0F, 0x09, 0x11, 0x11, |
|
817 |
+ |
|
818 |
+ /* character 0x73 ('s'): (width=4) */ |
|
819 |
+ 0x06, 0x09, 0x01, 0x06, 0x08, 0x09, 0x06, |
|
820 |
+ |
|
821 |
+ /* character 0x74 ('t'): (width=5) */ |
|
822 |
+ 0x1F, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, |
|
823 |
+ |
|
824 |
+ /* character 0x75 ('u'): (width=5) */ |
|
825 |
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0E, |
|
826 |
+ |
|
827 |
+ /* character 0x76 ('v'): (width=7) */ |
|
828 |
+ 0x41, 0x22, 0x22, 0x14, 0x14, 0x08, 0x08, |
|
829 |
+ |
|
830 |
+ /* character 0x77 ('w'): (width=7) */ |
|
831 |
+ 0x49, 0x49, 0x49, 0x55, 0x55, 0x22, 0x22, |
|
832 |
+ |
|
833 |
+ /* character 0x78 ('x'): (width=5) */ |
|
834 |
+ 0x11, 0x1B, 0x0A, 0x04, 0x0A, 0x1B, 0x11, |
|
835 |
+ |
|
836 |
+ /* character 0x79 ('y'): (width=7) */ |
|
837 |
+ 0x41, 0x22, 0x14, 0x08, 0x08, 0x08, 0x08, |
|
838 |
+ |
|
839 |
+ /* character 0x7A ('z'): (width=5) */ |
|
840 |
+ 0x1F, 0x10, 0x08, 0x04, 0x02, 0x01, 0x1F, |
|
841 |
+ |
|
842 |
+ /* character 0x7B ('{'): (width=3) */ |
|
843 |
+ 0x04, 0x02, 0x01, 0x01, 0x01, 0x02, 0x04, |
|
844 |
+ |
|
845 |
+ /* character 0x7C ('|'): (width=1) */ |
|
846 |
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, |
|
847 |
+ |
|
848 |
+ /* character 0x7D ('}'): (width=3) */ |
|
849 |
+ 0x01, 0x02, 0x04, 0x04, 0x04, 0x02, 0x01, |
|
850 |
+ |
|
851 |
+}; |
|
852 |
+ |
|
853 |
+const unsigned char MetaWatch7width[PRINTABLE_CHARACTERS] = { |
|
854 |
+/* width char hexcode */ |
|
855 |
+/* ===== ==== ======= */ |
|
856 |
+ 2, /* ' ' 20 */ |
|
857 |
+ 1, /* ! 21 */ |
|
858 |
+ 3, /* " 22 */ |
|
859 |
+ 7, /* # 23 */ |
|
860 |
+ 5, /* $ 24 */ |
|
861 |
+ 7, /* % 25 */ |
|
862 |
+ 5, /* & 26 */ |
|
863 |
+ 3, /* ' 27 */ |
|
864 |
+ 3, /* ( 28 */ |
|
865 |
+ 3, /* ) 29 */ |
|
866 |
+ 7, /* * 2A */ |
|
867 |
+ 5, /* + 2B */ |
|
868 |
+ 1, /* , 2C */ |
|
869 |
+ 4, /* - 2D */ |
|
870 |
+ 1, /* . 2E */ |
|
871 |
+ 4, /* / 2F */ |
|
872 |
+ 4, /* 0 30 */ |
|
873 |
+ 2, /* 1 31 */ |
|
874 |
+ 4, /* 2 32 */ |
|
875 |
+ 4, /* 3 33 */ |
|
876 |
+ 5, /* 4 34 */ |
|
877 |
+ 4, /* 5 35 */ |
|
878 |
+ 4, /* 6 36 */ |
|
879 |
+ 4, /* 7 37 */ |
|
880 |
+ 4, /* 8 38 */ |
|
881 |
+ 4, /* 9 39 */ |
|
882 |
+ 1, /* : 3A */ |
|
883 |
+ 1, /* ; 3B */ |
|
884 |
+ 3, /* < 3C */ |
|
885 |
+ 4, /* = 3D */ |
|
886 |
+ 3, /* > 3E */ |
|
887 |
+ 4, /* ? 3F */ |
|
888 |
+ 7, /* @ 40 */ |
|
889 |
+ 7, /* A 41 */ |
|
890 |
+ 5, /* B 42 */ |
|
891 |
+ 5, /* C 43 */ |
|
892 |
+ 5, /* D 44 */ |
|
893 |
+ 4, /* E 45 */ |
|
894 |
+ 4, /* F 46 */ |
|
895 |
+ 6, /* G 47 */ |
|
896 |
+ 5, /* H 48 */ |
|
897 |
+ 3, /* I 49 */ |
|
898 |
+ 5, /* J 4A */ |
|
899 |
+ 5, /* K 4B */ |
|
900 |
+ 4, /* L 4C */ |
|
901 |
+ 7, /* M 4D */ |
|
902 |
+ 6, /* N 4E */ |
|
903 |
+ 6, /* O 4F */ |
|
904 |
+ 4, /* P 50 */ |
|
905 |
+ 7, /* Q 51 */ |
|
906 |
+ 5, /* R 52 */ |
|
907 |
+ 4, /* S 53 */ |
|
908 |
+ 5, /* T 54 */ |
|
909 |
+ 5, /* U 55 */ |
|
910 |
+ 7, /* V 56 */ |
|
911 |
+ 7, /* W 57 */ |
|
912 |
+ 5, /* X 58 */ |
|
913 |
+ 7, /* Y 59 */ |
|
914 |
+ 5, /* Z 5A */ |
|
915 |
+ 3, /* [ 5B */ |
|
916 |
+ 4, /* \ 5C */ |
|
917 |
+ 3, /* ] 5D */ |
|
918 |
+ 5, /* ^ 5E */ |
|
919 |
+ 5, /* _ 5F */ |
|
920 |
+ 1, /* ` 60 */ |
|
921 |
+ 7, /* a 61 */ |
|
922 |
+ 5, /* b 62 */ |
|
923 |
+ 5, /* c 63 */ |
|
924 |
+ 5, /* d 64 */ |
|
925 |
+ 4, /* e 65 */ |
|
926 |
+ 4, /* f 66 */ |
|
927 |
+ 6, /* g 67 */ |
|
928 |
+ 5, /* h 68 */ |
|
929 |
+ 3, /* i 69 */ |
|
930 |
+ 5, /* j 6A */ |
|
931 |
+ 5, /* k 6B */ |
|
932 |
+ 4, /* l 6C */ |
|
933 |
+ 7, /* m 6D */ |
|
934 |
+ 6, /* n 6E */ |
|
935 |
+ 6, /* o 6F */ |
|
936 |
+ 4, /* p 70 */ |
|
937 |
+ 7, /* q 71 */ |
|
938 |
+ 5, /* r 72 */ |
|
939 |
+ 4, /* s 73 */ |
|
940 |
+ 5, /* t 74 */ |
|
941 |
+ 5, /* u 75 */ |
|
942 |
+ 7, /* v 76 */ |
|
943 |
+ 7, /* w 77 */ |
|
944 |
+ 5, /* x 78 */ |
|
945 |
+ 7, /* y 79 */ |
|
946 |
+ 5, /* z 7A */ |
|
947 |
+ 3, /* { 7B */ |
|
948 |
+ 1, /* | 7C */ |
|
949 |
+ 3, /* } 7D */ |
|
950 |
+}; |
|
951 |
+ |
|
952 |
+ |
|
953 |
+const unsigned int MetaWatch16table[PRINTABLE_CHARACTERS][16] = |
|
954 |
+{ |
|
955 |
+ /* character 0x20 (' '): (width=4) */ |
|
956 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
957 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
958 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
959 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
960 |
+ |
|
961 |
+ /* character 0x21 ('!'): (width=2) */ |
|
962 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
963 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
964 |
+ 0x0003, 0x0003, 0x0000, 0x0003, |
|
965 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
966 |
+ |
|
967 |
+ /* character 0x22 ('"'): (width=5) */ |
|
968 |
+ 0x0000, 0x0012, 0x001B, 0x001B, |
|
969 |
+ 0x0009, 0x0000, 0x0000, 0x0000, |
|
970 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
971 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
972 |
+ |
|
973 |
+ /* character 0x23 ('#'): (width=12) */ |
|
974 |
+ 0x0000, 0x0000, 0x0000, 0x0110, |
|
975 |
+ 0x0198, 0x0FFE, 0x07FF, 0x0198, |
|
976 |
+ 0x0198, 0x0FFE, 0x07FF, 0x0198, |
|
977 |
+ 0x0088, 0x0000, 0x0000, 0x0000, |
|
978 |
+ |
|
979 |
+ /* character 0x24 ('$'): (width=6) */ |
|
980 |
+ 0x000C, 0x000C, 0x001E, 0x003F, |
|
981 |
+ 0x0033, 0x0003, 0x0007, 0x001E, |
|
982 |
+ 0x0038, 0x0030, 0x0033, 0x003F, |
|
983 |
+ 0x001E, 0x000C, 0x000C, 0x0000, |
|
984 |
+ |
|
985 |
+ /* character 0x25 ('%'): (width=10) */ |
|
986 |
+ 0x0000, 0x020E, 0x031F, 0x039B, |
|
987 |
+ 0x01DF, 0x00EE, 0x0070, 0x0038, |
|
988 |
+ 0x01DC, 0x03EE, 0x0367, 0x03E3, |
|
989 |
+ 0x01C1, 0x0000, 0x0000, 0x0000, |
|
990 |
+ |
|
991 |
+ /* character 0x26 ('&'): (width=10) */ |
|
992 |
+ 0x0000, 0x0000, 0x001C, 0x003E, |
|
993 |
+ 0x0036, 0x003E, 0x001C, 0x01BE, |
|
994 |
+ 0x01F7, 0x00E3, 0x01F7, 0x03BE, |
|
995 |
+ 0x031C, 0x0000, 0x0000, 0x0000, |
|
996 |
+ |
|
997 |
+ /* character 0x27 ('''): (width=2) */ |
|
998 |
+ 0x0000, 0x0002, 0x0003, 0x0003, |
|
999 |
+ 0x0001, 0x0000, 0x0000, 0x0000, |
|
1000 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1001 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1002 |
+ |
|
1003 |
+ /* character 0x28 ('('): (width=4) */ |
|
1004 |
+ 0x0008, 0x0004, 0x0006, 0x0006, |
|
1005 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1006 |
+ 0x0003, 0x0003, 0x0003, 0x0006, |
|
1007 |
+ 0x0006, 0x0004, 0x0008, 0x0000, |
|
1008 |
+ |
|
1009 |
+ /* character 0x29 (')'): (width=4) */ |
|
1010 |
+ 0x0001, 0x0002, 0x0006, 0x0006, |
|
1011 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1012 |
+ 0x000C, 0x000C, 0x000C, 0x0006, |
|
1013 |
+ 0x0006, 0x0002, 0x0001, 0x0000, |
|
1014 |
+ |
|
1015 |
+ /* character 0x2A ('*'): (width=8) */ |
|
1016 |
+ 0x0000, 0x0000, 0x0018, 0x0018, |
|
1017 |
+ 0x00DB, 0x00FF, 0x003C, 0x00FF, |
|
1018 |
+ 0x00DB, 0x0018, 0x0018, 0x0000, |
|
1019 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1020 |
+ |
|
1021 |
+ /* character 0x2B ('+'): (width=8) */ |
|
1022 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1023 |
+ 0x0018, 0x0018, 0x0018, 0x00FF, |
|
1024 |
+ 0x00FF, 0x0018, 0x0018, 0x0018, |
|
1025 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1026 |
+ |
|
1027 |
+ /* character 0x2C (','): (width=2) */ |
|
1028 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1029 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1030 |
+ 0x0000, 0x0000, 0x0000, 0x0002, |
|
1031 |
+ 0x0003, 0x0003, 0x0001, 0x0000, |
|
1032 |
+ |
|
1033 |
+ /* character 0x2D ('-'): (width=8) */ |
|
1034 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1035 |
+ 0x0000, 0x0000, 0x0000, 0x00FF, |
|
1036 |
+ 0x00FF, 0x0000, 0x0000, 0x0000, |
|
1037 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1038 |
+ |
|
1039 |
+ /* character 0x2E ('.'): (width=2) */ |
|
1040 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1041 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1042 |
+ 0x0000, 0x0000, 0x0000, 0x0003, |
|
1043 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1044 |
+ |
|
1045 |
+ /* character 0x2F ('/'): (width=6) */ |
|
1046 |
+ 0x0000, 0x0000, 0x0000, 0x0030, |
|
1047 |
+ 0x0030, 0x0018, 0x0018, 0x000C, |
|
1048 |
+ 0x000C, 0x0006, 0x0006, 0x0003, |
|
1049 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1050 |
+ |
|
1051 |
+ /* character 0x30 ('0'): (width=7) */ |
|
1052 |
+ 0x0000, 0x0000, 0x001C, 0x003E, |
|
1053 |
+ 0x0036, 0x0063, 0x0063, 0x0063, |
|
1054 |
+ 0x0063, 0x0063, 0x0036, 0x003E, |
|
1055 |
+ 0x001C, 0x0000, 0x0000, 0x0000, |
|
1056 |
+ |
|
1057 |
+ /* character 0x31 ('1'): (width=3) */ |
|
1058 |
+ 0x0000, 0x0000, 0x0006, 0x0007, |
|
1059 |
+ 0x0007, 0x0006, 0x0006, 0x0006, |
|
1060 |
+ 0x0006, 0x0006, 0x0006, 0x0006, |
|
1061 |
+ 0x0006, 0x0000, 0x0000, 0x0000, |
|
1062 |
+ |
|
1063 |
+ /* character 0x32 ('2'): (width=6) */ |
|
1064 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1065 |
+ 0x0033, 0x0030, 0x0038, 0x001C, |
|
1066 |
+ 0x000E, 0x0007, 0x0003, 0x003F, |
|
1067 |
+ 0x003F, 0x0000, 0x0000, 0x0000, |
|
1068 |
+ |
|
1069 |
+ /* character 0x33 ('3'): (width=6) */ |
|
1070 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1071 |
+ 0x0033, 0x0030, 0x001C, 0x003C, |
|
1072 |
+ 0x0030, 0x0030, 0x0033, 0x003F, |
|
1073 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1074 |
+ |
|
1075 |
+ /* character 0x34 ('4'): (width=7) */ |
|
1076 |
+ 0x0000, 0x0000, 0x000C, 0x000C, |
|
1077 |
+ 0x000C, 0x0036, 0x0036, 0x0033, |
|
1078 |
+ 0x007F, 0x007F, 0x0030, 0x0030, |
|
1079 |
+ 0x0030, 0x0000, 0x0000, 0x0000, |
|
1080 |
+ |
|
1081 |
+ /* character 0x35 ('5'): (width=6) */ |
|
1082 |
+ 0x0000, 0x0000, 0x003F, 0x003F, |
|
1083 |
+ 0x0003, 0x0003, 0x001F, 0x003F, |
|
1084 |
+ 0x0030, 0x0030, 0x0033, 0x003F, |
|
1085 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1086 |
+ |
|
1087 |
+ /* character 0x36 ('6'): (width=6) */ |
|
1088 |
+ 0x0000, 0x0000, 0x000C, 0x000E, |
|
1089 |
+ 0x0006, 0x0003, 0x001F, 0x003F, |
|
1090 |
+ 0x0033, 0x0033, 0x0033, 0x001F, |
|
1091 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1092 |
+ |
|
1093 |
+ /* character 0x37 ('7'): (width=6) */ |
|
1094 |
+ 0x0000, 0x0000, 0x003F, 0x003F, |
|
1095 |
+ 0x0030, 0x0030, 0x0018, 0x0018, |
|
1096 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1097 |
+ 0x000C, 0x0000, 0x0000, 0x0000, |
|
1098 |
+ |
|
1099 |
+ /* character 0x38 ('8'): (width=6) */ |
|
1100 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1101 |
+ 0x0033, 0x0033, 0x003F, 0x001E, |
|
1102 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1103 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1104 |
+ |
|
1105 |
+ /* character 0x39 ('9'): (width=6) */ |
|
1106 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1107 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1108 |
+ 0x003E, 0x0030, 0x0018, 0x001C, |
|
1109 |
+ 0x000C, 0x0000, 0x0000, 0x0000, |
|
1110 |
+ |
|
1111 |
+ /* character 0x3A (':'): (width=2) */ |
|
1112 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1113 |
+ 0x0000, 0x0003, 0x0003, 0x0000, |
|
1114 |
+ 0x0000, 0x0003, 0x0003, 0x0000, |
|
1115 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1116 |
+ |
|
1117 |
+ /* character 0x3B (';'): (width=2) */ |
|
1118 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1119 |
+ 0x0000, 0x0003, 0x0003, 0x0000, |
|
1120 |
+ 0x0002, 0x0003, 0x0003, 0x0001, |
|
1121 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1122 |
+ |
|
1123 |
+ /* character 0x3C ('<'): (width=8) */ |
|
1124 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1125 |
+ 0x00C0, 0x00F0, 0x003C, 0x000F, |
|
1126 |
+ 0x003C, 0x00F0, 0x00C0, 0x0000, |
|
1127 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1128 |
+ |
|
1129 |
+ /* character 0x3D ('='): (width=7) */ |
|
1130 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1131 |
+ 0x0000, 0x0000, 0x007F, 0x007F, |
|
1132 |
+ 0x0000, 0x007F, 0x007F, 0x0000, |
|
1133 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1134 |
+ |
|
1135 |
+ /* character 0x3E ('>'): (width=8) */ |
|
1136 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1137 |
+ 0x0003, 0x000F, 0x003C, 0x00F0, |
|
1138 |
+ 0x003C, 0x000F, 0x0003, 0x0000, |
|
1139 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1140 |
+ |
|
1141 |
+ /* character 0x3F ('?'): (width=6) */ |
|
1142 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1143 |
+ 0x0033, 0x0030, 0x0018, 0x001C, |
|
1144 |
+ 0x000C, 0x000C, 0x0000, 0x000C, |
|
1145 |
+ 0x000C, 0x0000, 0x0000, 0x0000, |
|
1146 |
+ |
|
1147 |
+ /* character 0x40 ('@'): (width=11) */ |
|
1148 |
+ 0x0000, 0x0000, 0x01F8, 0x03FE, |
|
1149 |
+ 0x0706, 0x06F3, 0x06FB, 0x06DB, |
|
1150 |
+ 0x07FB, 0x03F3, 0x0006, 0x01FE, |
|
1151 |
+ 0x00F8, 0x0000, 0x0000, 0x0000, |
|
1152 |
+ |
|
1153 |
+ /* character 0x41 ('A'): (width=9) */ |
|
1154 |
+ 0x0000, 0x0000, 0x0010, 0x0010, |
|
1155 |
+ 0x0038, 0x0038, 0x006C, 0x006C, |
|
1156 |
+ 0x00C6, 0x00C6, 0x01FF, 0x0183, |
|
1157 |
+ 0x0183, 0x0000, 0x0000, 0x0000, |
|
1158 |
+ |
|
1159 |
+ /* character 0x42 ('B'): (width=7) */ |
|
1160 |
+ 0x0000, 0x0000, 0x003F, 0x007F, |
|
1161 |
+ 0x0063, 0x0063, 0x003F, 0x007F, |
|
1162 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1163 |
+ 0x003F, 0x0000, 0x0000, 0x0000, |
|
1164 |
+ |
|
1165 |
+ /* character 0x43 ('C'): (width=7) */ |
|
1166 |
+ 0x0000, 0x0000, 0x003E, 0x007F, |
|
1167 |
+ 0x0063, 0x0003, 0x0003, 0x0003, |
|
1168 |
+ 0x0003, 0x0003, 0x0063, 0x007F, |
|
1169 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1170 |
+ |
|
1171 |
+ /* character 0x44 ('D'): (width=7) */ |
|
1172 |
+ 0x0000, 0x0000, 0x003F, 0x007F, |
|
1173 |
+ 0x0063, 0x0063, 0x0063, 0x0063, |
|
1174 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1175 |
+ 0x003F, 0x0000, 0x0000, 0x0000, |
|
1176 |
+ |
|
1177 |
+ /* character 0x45 ('E'): (width=7) */ |
|
1178 |
+ 0x0000, 0x0000, 0x007F, 0x007F, |
|
1179 |
+ 0x0003, 0x0003, 0x001F, 0x001F, |
|
1180 |
+ 0x0003, 0x0003, 0x0003, 0x007F, |
|
1181 |
+ 0x007F, 0x0000, 0x0000, 0x0000, |
|
1182 |
+ |
|
1183 |
+ /* character 0x46 ('F'): (width=6) */ |
|
1184 |
+ 0x0000, 0x0000, 0x003F, 0x003F, |
|
1185 |
+ 0x0003, 0x0003, 0x003F, 0x003F, |
|
1186 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1187 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1188 |
+ |
|
1189 |
+ /* character 0x47 ('G'): (width=7) */ |
|
1190 |
+ 0x0000, 0x0000, 0x003E, 0x007F, |
|
1191 |
+ 0x0063, 0x0003, 0x0003, 0x007B, |
|
1192 |
+ 0x007B, 0x0063, 0x0063, 0x007F, |
|
1193 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1194 |
+ |
|
1195 |
+ /* character 0x48 ('H'): (width=7) */ |
|
1196 |
+ 0x0000, 0x0000, 0x0063, 0x0063, |
|
1197 |
+ 0x0063, 0x0063, 0x007F, 0x007F, |
|
1198 |
+ 0x0063, 0x0063, 0x0063, 0x0063, |
|
1199 |
+ 0x0063, 0x0000, 0x0000, 0x0000, |
|
1200 |
+ |
|
1201 |
+ /* character 0x49 ('I'): (width=4) */ |
|
1202 |
+ 0x0000, 0x0000, 0x000F, 0x000F, |
|
1203 |
+ 0x0006, 0x0006, 0x0006, 0x0006, |
|
1204 |
+ 0x0006, 0x0006, 0x0006, 0x000F, |
|
1205 |
+ 0x000F, 0x0000, 0x0000, 0x0000, |
|
1206 |
+ |
|
1207 |
+ /* character 0x4A ('J'): (width=6) */ |
|
1208 |
+ 0x0000, 0x0000, 0x0030, 0x0030, |
|
1209 |
+ 0x0030, 0x0030, 0x0030, 0x0030, |
|
1210 |
+ 0x0030, 0x0030, 0x0033, 0x003F, |
|
1211 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1212 |
+ |
|
1213 |
+ /* character 0x4B ('K'): (width=7) */ |
|
1214 |
+ 0x0000, 0x0000, 0x0063, 0x0073, |
|
1215 |
+ 0x003B, 0x001F, 0x000F, 0x0007, |
|
1216 |
+ 0x000F, 0x001F, 0x003B, 0x0073, |
|
1217 |
+ 0x0063, 0x0000, 0x0000, 0x0000, |
|
1218 |
+ |
|
1219 |
+ /* character 0x4C ('L'): (width=6) */ |
|
1220 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1221 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1222 |
+ 0x0003, 0x0003, 0x0003, 0x003F, |
|
1223 |
+ 0x003F, 0x0000, 0x0000, 0x0000, |
|
1224 |
+ |
|
1225 |
+ /* character 0x4D ('M'): (width=11) */ |
|
1226 |
+ 0x0000, 0x0000, 0x0401, 0x0603, |
|
1227 |
+ 0x0707, 0x078F, 0x07DF, 0x06FB, |
|
1228 |
+ 0x0673, 0x0623, 0x0603, 0x0603, |
|
1229 |
+ 0x0603, 0x0000, 0x0000, 0x0000, |
|
1230 |
+ |
|
1231 |
+ /* character 0x4E ('N'): (width=9) */ |
|
1232 |
+ 0x0000, 0x0000, 0x0181, 0x0183, |
|
1233 |
+ 0x0187, 0x018F, 0x019F, 0x01BB, |
|
1234 |
+ 0x01F3, 0x01E3, 0x01C3, 0x0183, |
|
1235 |
+ 0x0103, 0x0000, 0x0000, 0x0000, |
|
1236 |
+ |
|
1237 |
+ /* character 0x4F ('O'): (width=7) */ |
|
1238 |
+ 0x0000, 0x0000, 0x003E, 0x007F, |
|
1239 |
+ 0x0063, 0x0063, 0x0063, 0x0063, |
|
1240 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1241 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1242 |
+ |
|
1243 |
+ /* character 0x50 ('P'): (width=7) */ |
|
1244 |
+ 0x0000, 0x0000, 0x003F, 0x007F, |
|
1245 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1246 |
+ 0x003F, 0x0003, 0x0003, 0x0003, |
|
1247 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1248 |
+ |
|
1249 |
+ /* character 0x51 ('Q'): (width=8) */ |
|
1250 |
+ 0x0000, 0x0000, 0x003E, 0x007F, |
|
1251 |
+ 0x0063, 0x0063, 0x0063, 0x0063, |
|
1252 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1253 |
+ 0x003E, 0x00F0, 0x0060, 0x0000, |
|
1254 |
+ |
|
1255 |
+ /* character 0x52 ('R'): (width=7) */ |
|
1256 |
+ 0x0000, 0x0000, 0x003F, 0x007F, |
|
1257 |
+ 0x0063, 0x0063, 0x0063, 0x003F, |
|
1258 |
+ 0x007F, 0x0063, 0x0063, 0x0063, |
|
1259 |
+ 0x0063, 0x0000, 0x0000, 0x0000, |
|
1260 |
+ |
|
1261 |
+ /* character 0x53 ('S'): (width=6) */ |
|
1262 |
+ 0x0000, 0x0000, 0x001E, 0x003F, |
|
1263 |
+ 0x0033, 0x0003, 0x0007, 0x001E, |
|
1264 |
+ 0x0038, 0x0030, 0x0033, 0x003F, |
|
1265 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1266 |
+ |
|
1267 |
+ /* character 0x54 ('T'): (width=6) */ |
|
1268 |
+ 0x0000, 0x0000, 0x003F, 0x003F, |
|
1269 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1270 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1271 |
+ 0x000C, 0x0000, 0x0000, 0x0000, |
|
1272 |
+ |
|
1273 |
+ /* character 0x55 ('U'): (width=7) */ |
|
1274 |
+ 0x0000, 0x0000, 0x0063, 0x0063, |
|
1275 |
+ 0x0063, 0x0063, 0x0063, 0x0063, |
|
1276 |
+ 0x0063, 0x0063, 0x0063, 0x007F, |
|
1277 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1278 |
+ |
|
1279 |
+ /* character 0x56 ('V'): (width=7) */ |
|
1280 |
+ 0x0000, 0x0000, 0x0063, 0x0063, |
|
1281 |
+ 0x0063, 0x0036, 0x0036, 0x0036, |
|
1282 |
+ 0x001C, 0x001C, 0x001C, 0x0008, |
|
1283 |
+ 0x0008, 0x0000, 0x0000, 0x0000, |
|
1284 |
+ |
|
1285 |
+ /* character 0x57 ('W'): (width=11) */ |
|
1286 |
+ 0x0000, 0x0000, 0x0603, 0x0623, |
|
1287 |
+ 0x0623, 0x0376, 0x0376, 0x0376, |
|
1288 |
+ 0x01DC, 0x01DC, 0x01DC, 0x0088, |
|
1289 |
+ 0x0088, 0x0000, 0x0000, 0x0000, |
|
1290 |
+ |
|
1291 |
+ /* character 0x58 ('X'): (width=7) */ |
|
1292 |
+ 0x0000, 0x0000, 0x0063, 0x0063, |
|
1293 |
+ 0x0036, 0x0036, 0x001C, 0x001C, |
|
1294 |
+ 0x001C, 0x0036, 0x0036, 0x0063, |
|
1295 |
+ 0x0063, 0x0000, 0x0000, 0x0000, |
|
1296 |
+ |
|
1297 |
+ /* character 0x59 ('Y'): (width=8) */ |
|
1298 |
+ 0x0000, 0x0000, 0x00C3, 0x00C3, |
|
1299 |
+ 0x0066, 0x0066, 0x003C, 0x003C, |
|
1300 |
+ 0x0018, 0x0018, 0x0018, 0x0018, |
|
1301 |
+ 0x0018, 0x0000, 0x0000, 0x0000, |
|
1302 |
+ |
|
1303 |
+ /* character 0x5A ('Z'): (width=7) */ |
|
1304 |
+ 0x0000, 0x0000, 0x007F, 0x007F, |
|
1305 |
+ 0x0030, 0x0030, 0x0018, 0x0018, |
|
1306 |
+ 0x000C, 0x000E, 0x0006, 0x007F, |
|
1307 |
+ 0x007F, 0x0000, 0x0000, 0x0000, |
|
1308 |
+ |
|
1309 |
+ /* character 0x5B ('['): (width=4) */ |
|
1310 |
+ 0x000F, 0x000F, 0x0003, 0x0003, |
|
1311 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1312 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1313 |
+ 0x0003, 0x000F, 0x000F, 0x0000, |
|
1314 |
+ |
|
1315 |
+ /* character 0x5C ('\'): (width=6) */ |
|
1316 |
+ 0x0000, 0x0000, 0x0000, 0x0003, |
|
1317 |
+ 0x0003, 0x0006, 0x0006, 0x000C, |
|
1318 |
+ 0x000C, 0x0018, 0x0018, 0x0030, |
|
1319 |
+ 0x0030, 0x0000, 0x0000, 0x0000, |
|
1320 |
+ |
|
1321 |
+ /* character 0x5D (']'): (width=4) */ |
|
1322 |
+ 0x000F, 0x000F, 0x000C, 0x000C, |
|
1323 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1324 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1325 |
+ 0x000C, 0x000F, 0x000F, 0x0000, |
|
1326 |
+ |
|
1327 |
+ /* character 0x5E ('^'): (width=7) */ |
|
1328 |
+ 0x0000, 0x0000, 0x0000, 0x0008, |
|
1329 |
+ 0x0008, 0x001C, 0x001C, 0x0036, |
|
1330 |
+ 0x0036, 0x0063, 0x0063, 0x0000, |
|
1331 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1332 |
+ |
|
1333 |
+ /* character 0x5F ('_'): (width=9) */ |
|
1334 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1335 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1336 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1337 |
+ 0x01FF, 0x0000, 0x0000, 0x0000, |
|
1338 |
+ |
|
1339 |
+ /* character 0x60 ('`'): (width=3) */ |
|
1340 |
+ 0x0000, 0x0000, 0x0000, 0x0001, |
|
1341 |
+ 0x0003, 0x0006, 0x0004, 0x0000, |
|
1342 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1343 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1344 |
+ |
|
1345 |
+ /* character 0x61 ('a'): (width=6) */ |
|
1346 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1347 |
+ 0x0000, 0x001E, 0x003F, 0x0030, |
|
1348 |
+ 0x003E, 0x003F, 0x0033, 0x003F, |
|
1349 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1350 |
+ |
|
1351 |
+ /* character 0x62 ('b'): (width=6) */ |
|
1352 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1353 |
+ 0x0003, 0x001F, 0x003F, 0x0033, |
|
1354 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1355 |
+ 0x001F, 0x0000, 0x0000, 0x0000, |
|
1356 |
+ |
|
1357 |
+ /* character 0x63 ('c'): (width=6) */ |
|
1358 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1359 |
+ 0x0000, 0x001E, 0x003F, 0x0033, |
|
1360 |
+ 0x0003, 0x0003, 0x0033, 0x003F, |
|
1361 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1362 |
+ |
|
1363 |
+ /* character 0x64 ('d'): (width=6) */ |
|
1364 |
+ 0x0000, 0x0000, 0x0030, 0x0030, |
|
1365 |
+ 0x0030, 0x003E, 0x003F, 0x0033, |
|
1366 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1367 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1368 |
+ |
|
1369 |
+ /* character 0x65 ('e'): (width=6) */ |
|
1370 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1371 |
+ 0x0000, 0x001E, 0x003F, 0x0033, |
|
1372 |
+ 0x003F, 0x003F, 0x0003, 0x003F, |
|
1373 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1374 |
+ |
|
1375 |
+ /* character 0x66 ('f'): (width=4) */ |
|
1376 |
+ 0x0000, 0x0000, 0x000C, 0x000E, |
|
1377 |
+ 0x0006, 0x000F, 0x000F, 0x0006, |
|
1378 |
+ 0x0006, 0x0006, 0x0006, 0x0006, |
|
1379 |
+ 0x0006, 0x0000, 0x0000, 0x0000, |
|
1380 |
+ |
|
1381 |
+ /* character 0x67 ('g'): (width=6) */ |
|
1382 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1383 |
+ 0x0000, 0x003E, 0x003F, 0x0033, |
|
1384 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1385 |
+ 0x003E, 0x0030, 0x003E, 0x001C, |
|
1386 |
+ |
|
1387 |
+ /* character 0x68 ('h'): (width=6) */ |
|
1388 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1389 |
+ 0x0003, 0x001F, 0x003F, 0x0033, |
|
1390 |
+ 0x0033, 0x0033, 0x0033, 0x0033, |
|
1391 |
+ 0x0033, 0x0000, 0x0000, 0x0000, |
|
1392 |
+ |
|
1393 |
+ /* character 0x69 ('i'): (width=2) */ |
|
1394 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1395 |
+ 0x0000, 0x0003, 0x0003, 0x0003, |
|
1396 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1397 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1398 |
+ |
|
1399 |
+ /* character 0x6A ('j'): (width=5) */ |
|
1400 |
+ 0x0000, 0x0000, 0x0018, 0x0018, |
|
1401 |
+ 0x0000, 0x0018, 0x0018, 0x0018, |
|
1402 |
+ 0x0018, 0x0018, 0x0018, 0x0018, |
|
1403 |
+ 0x0018, 0x0018, 0x001F, 0x000E, |
|
1404 |
+ |
|
1405 |
+ /* character 0x6B ('k'): (width=6) */ |
|
1406 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1407 |
+ 0x0003, 0x0033, 0x003B, 0x001F, |
|
1408 |
+ 0x000F, 0x000F, 0x001F, 0x003B, |
|
1409 |
+ 0x0033, 0x0000, 0x0000, 0x0000, |
|
1410 |
+ |
|
1411 |
+ /* character 0x6C ('l'): (width=2) */ |
|
1412 |
+ 0x0000, 0x0000, 0x0003, 0x0003, |
|
1413 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1414 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1415 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1416 |
+ |
|
1417 |
+ /* character 0x6D ('m'): (width=10) */ |
|
1418 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1419 |
+ 0x0000, 0x01DB, 0x03FF, 0x0377, |
|
1420 |
+ 0x0333, 0x0333, 0x0333, 0x0333, |
|
1421 |
+ 0x0333, 0x0000, 0x0000, 0x0000, |
|
1422 |
+ |
|
1423 |
+ /* character 0x6E ('n'): (width=6) */ |
|
1424 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1425 |
+ 0x0000, 0x001B, 0x003F, 0x0037, |
|
1426 |
+ 0x0033, 0x0033, 0x0033, 0x0033, |
|
1427 |
+ 0x0033, 0x0000, 0x0000, 0x0000, |
|
1428 |
+ |
|
1429 |
+ /* character 0x6F ('o'): (width=6) */ |
|
1430 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1431 |
+ 0x0000, 0x001E, 0x003F, 0x0033, |
|
1432 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1433 |
+ 0x001E, 0x0000, 0x0000, 0x0000, |
|
1434 |
+ |
|
1435 |
+ /* character 0x70 ('p'): (width=6) */ |
|
1436 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1437 |
+ 0x0000, 0x001F, 0x003F, 0x0033, |
|
1438 |
+ 0x0033, 0x0033, 0x0033, 0x001F, |
|
1439 |
+ 0x001F, 0x0003, 0x0003, 0x0003, |
|
1440 |
+ |
|
1441 |
+ /* character 0x71 ('q'): (width=6) */ |
|
1442 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1443 |
+ 0x0000, 0x003E, 0x003F, 0x0033, |
|
1444 |
+ 0x0033, 0x0033, 0x0033, 0x003E, |
|
1445 |
+ 0x003E, 0x0030, 0x0030, 0x0030, |
|
1446 |
+ |
|
1447 |
+ /* character 0x72 ('r'): (width=5) */ |
|
1448 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1449 |
+ 0x0000, 0x001B, 0x001F, 0x0007, |
|
1450 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1451 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1452 |
+ |
|
1453 |
+ /* character 0x73 ('s'): (width=5) */ |
|
1454 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1455 |
+ 0x0000, 0x000E, 0x001F, 0x0003, |
|
1456 |
+ 0x000F, 0x001E, 0x0018, 0x001F, |
|
1457 |
+ 0x000E, 0x0000, 0x0000, 0x0000, |
|
1458 |
+ |
|
1459 |
+ /* character 0x74 ('t'): (width=4) */ |
|
1460 |
+ 0x0000, 0x0000, 0x0004, 0x0006, |
|
1461 |
+ 0x0006, 0x000F, 0x000F, 0x0006, |
|
1462 |
+ 0x0006, 0x0006, 0x0006, 0x000E, |
|
1463 |
+ 0x000C, 0x0000, 0x0000, 0x0000, |
|
1464 |
+ |
|
1465 |
+ /* character 0x75 ('u'): (width=6) */ |
|
1466 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1467 |
+ 0x0000, 0x0033, 0x0033, 0x0033, |
|
1468 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1469 |
+ 0x003E, 0x0000, 0x0000, 0x0000, |
|
1470 |
+ |
|
1471 |
+ /* character 0x76 ('v'): (width=7) */ |
|
1472 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1473 |
+ 0x0000, 0x0063, 0x0063, 0x0036, |
|
1474 |
+ 0x0036, 0x001C, 0x001C, 0x0008, |
|
1475 |
+ 0x0008, 0x0000, 0x0000, 0x0000, |
|
1476 |
+ |
|
1477 |
+ /* character 0x77 ('w'): (width=11) */ |
|
1478 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1479 |
+ 0x0000, 0x0623, 0x0623, 0x0376, |
|
1480 |
+ 0x0376, 0x01DC, 0x01DC, 0x0088, |
|
1481 |
+ 0x0088, 0x0000, 0x0000, 0x0000, |
|
1482 |
+ |
|
1483 |
+ /* character 0x78 ('x'): (width=7) */ |
|
1484 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1485 |
+ 0x0000, 0x0063, 0x0077, 0x003E, |
|
1486 |
+ 0x001C, 0x001C, 0x003E, 0x0077, |
|
1487 |
+ 0x0063, 0x0000, 0x0000, 0x0000, |
|
1488 |
+ |
|
1489 |
+ /* character 0x79 ('y'): (width=6) */ |
|
1490 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1491 |
+ 0x0000, 0x0033, 0x0033, 0x0033, |
|
1492 |
+ 0x0033, 0x0033, 0x0033, 0x003F, |
|
1493 |
+ 0x003E, 0x0030, 0x003E, 0x001C, |
|
1494 |
+ |
|
1495 |
+ /* character 0x7A ('z'): (width=6) */ |
|
1496 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1497 |
+ 0x0000, 0x003F, 0x003F, 0x0030, |
|
1498 |
+ 0x0018, 0x000C, 0x0006, 0x003F, |
|
1499 |
+ 0x003F, 0x0000, 0x0000, 0x0000, |
|
1500 |
+ |
|
1501 |
+ /* character 0x7B ('{'): (width=4) */ |
|
1502 |
+ 0x0008, 0x0004, 0x0006, 0x0006, |
|
1503 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1504 |
+ 0x0003, 0x0003, 0x0003, 0x0006, |
|
1505 |
+ 0x0006, 0x0004, 0x0008, 0x0000, |
|
1506 |
+ |
|
1507 |
+ /* character 0x7C ('|'): (width=2) */ |
|
1508 |
+ 0x0000, 0x0003, 0x0003, 0x0003, |
|
1509 |
+ 0x0003, 0x0003, 0x0000, 0x0000, |
|
1510 |
+ 0x0003, 0x0003, 0x0003, 0x0003, |
|
1511 |
+ 0x0003, 0x0000, 0x0000, 0x0000, |
|
1512 |
+ |
|
1513 |
+ /* character 0x7D ('}'): (width=4) */ |
|
1514 |
+ 0x0001, 0x0002, 0x0006, 0x0006, |
|
1515 |
+ 0x000C, 0x000C, 0x000C, 0x000C, |
|
1516 |
+ 0x000C, 0x000C, 0x000C, 0x0006, |
|
1517 |
+ 0x0006, 0x0002, 0x0001, 0x0000, |
|
1518 |
+ |
|
1519 |
+}; |
|
1520 |
+ |
|
1521 |
+const unsigned char MetaWatch16width[PRINTABLE_CHARACTERS] = |
|
1522 |
+{ |
|
1523 |
+/* width char hexcode */ |
|
1524 |
+/* ===== ==== ======= */ |
|
1525 |
+ 4, /* ' ' 20 */ |
|
1526 |
+ 2, /* ! 21 */ |
|
1527 |
+ 5, /* " 22 */ |
|
1528 |
+ 12, /* # 23 */ |
|
1529 |
+ 6, /* $ 24 */ |
|
1530 |
+ 10, /* % 25 */ |
|
1531 |
+ 10, /* & 26 */ |
|
1532 |
+ 2, /* ' 27 */ |
|
1533 |
+ 4, /* ( 28 */ |
|
1534 |
+ 4, /* ) 29 */ |
|
1535 |
+ 8, /* * 2A */ |
|
1536 |
+ 8, /* + 2B */ |
|
1537 |
+ 2, /* , 2C */ |
|
1538 |
+ 8, /* - 2D */ |
|
1539 |
+ 2, /* . 2E */ |
|
1540 |
+ 6, /* / 2F */ |
|
1541 |
+ 7, /* 0 30 */ |
|
1542 |
+ 3, /* 1 31 */ |
|
1543 |
+ 6, /* 2 32 */ |
|
1544 |
+ 6, /* 3 33 */ |
|
1545 |
+ 7, /* 4 34 */ |
|
1546 |
+ 6, /* 5 35 */ |
|
1547 |
+ 6, /* 6 36 */ |
|
1548 |
+ 6, /* 7 37 */ |
|
1549 |
+ 6, /* 8 38 */ |
|
1550 |
+ 6, /* 9 39 */ |
|
1551 |
+ 2, /* : 3A */ |
|
1552 |
+ 2, /* ; 3B */ |
|
1553 |
+ 8, /* < 3C */ |
|
1554 |
+ 7, /* = 3D */ |
|
1555 |
+ 8, /* > 3E */ |
|
1556 |
+ 6, /* ? 3F */ |
|
1557 |
+ 11, /* @ 40 */ |
|
1558 |
+ 9, /* A 41 */ |
|
1559 |
+ 7, /* B 42 */ |
|
1560 |
+ 7, /* C 43 */ |
|
1561 |
+ 7, /* D 44 */ |
|
1562 |
+ 7, /* E 45 */ |
|
1563 |
+ 6, /* F 46 */ |
|
1564 |
+ 7, /* G 47 */ |
|
1565 |
+ 7, /* H 48 */ |
|
1566 |
+ 4, /* I 49 */ |
|
1567 |
+ 6, /* J 4A */ |
|
1568 |
+ 7, /* K 4B */ |
|
1569 |
+ 6, /* L 4C */ |
|
1570 |
+ 11, /* M 4D */ |
|
1571 |
+ 9, /* N 4E */ |
|
1572 |
+ 7, /* O 4F */ |
|
1573 |
+ 7, /* P 50 */ |
|
1574 |
+ 8, /* Q 51 */ |
|
1575 |
+ 7, /* R 52 */ |
|
1576 |
+ 6, /* S 53 */ |
|
1577 |
+ 6, /* T 54 */ |
|
1578 |
+ 7, /* U 55 */ |
|
1579 |
+ 7, /* V 56 */ |
|
1580 |
+ 11, /* W 57 */ |
|
1581 |
+ 7, /* X 58 */ |
|
1582 |
+ 8, /* Y 59 */ |
|
1583 |
+ 7, /* Z 5A */ |
|
1584 |
+ 4, /* [ 5B */ |
|
1585 |
+ 6, /* \ 5C */ |
|
1586 |
+ 4, /* ] 5D */ |
|
1587 |
+ 7, /* ^ 5E */ |
|
1588 |
+ 9, /* _ 5F */ |
|
1589 |
+ 3, /* ` 60 */ |
|
1590 |
+ 6, /* a 61 */ |
|
1591 |
+ 6, /* b 62 */ |
|
1592 |
+ 6, /* c 63 */ |
|
1593 |
+ 6, /* d 64 */ |
|
1594 |
+ 6, /* e 65 */ |
|
1595 |
+ 4, /* f 66 */ |
|
1596 |
+ 6, /* g 67 */ |
|
1597 |
+ 6, /* h 68 */ |
|
1598 |
+ 2, /* i 69 */ |
|
1599 |
+ 5, /* j 6A */ |
|
1600 |
+ 6, /* k 6B */ |
|
1601 |
+ 2, /* l 6C */ |
|
1602 |
+ 10, /* m 6D */ |
|
1603 |
+ 6, /* n 6E */ |
|
1604 |
+ 6, /* o 6F */ |
|
1605 |
+ 6, /* p 70 */ |
|
1606 |
+ 6, /* q 71 */ |
|
1607 |
+ 5, /* r 72 */ |
|
1608 |
+ 5, /* s 73 */ |
|
1609 |
+ 4, /* t 74 */ |
|
1610 |
+ 6, /* u 75 */ |
|
1611 |
+ 7, /* v 76 */ |
|
1612 |
+ 11, /* w 77 */ |
|
1613 |
+ 7, /* x 78 */ |
|
1614 |
+ 6, /* y 79 */ |
|
1615 |
+ 6, /* z 7A */ |
|
1616 |
+ 4, /* { 7B */ |
|
1617 |
+ 2, /* | 7C */ |
|
1618 |
+ 4, /* } 7D */ |
|
1619 |
+}; |
|
1620 |
+ |
|
1621 |
+/******************************************************************************/ |
|
1622 |
+const unsigned int MetaWatchTimeTable[TOTAL_TIME_CHARACTERS][19] = |
|
1623 |
+{ |
|
1624 |
+ /* character 0x30 ('0'): (width=11, offset=0) */ |
|
1625 |
+ 0x01FC, 0x03FE, 0x07FF, 0x07FF, |
|
1626 |
+ 0x078F, 0x078F, 0x078F, 0x078F, |
|
1627 |
+ 0x078F, 0x078F, 0x078F, 0x078F, |
|
1628 |
+ 0x078F, 0x078F, 0x078F, 0x07FF, |
|
1629 |
+ 0x07FF, 0x03FE, 0x01FC, |
|
1630 |
+ |
|
1631 |
+ /* character 0x31 ('1'): (width=11, offset=38) */ |
|
1632 |
+ 0x01C0, 0x01E0, 0x01F8, 0x01F8, |
|
1633 |
+ 0x01F8, 0x01F8, 0x01E0, 0x01E0, |
|
1634 |
+ 0x01E0, 0x01E0, 0x01E0, 0x01E0, |
|
1635 |
+ 0x01E0, 0x01E0, 0x01E0, 0x01E0, |
|
1636 |
+ 0x01E0, 0x01E0, 0x01E0, |
|
1637 |
+ |
|
1638 |
+ /* character 0x32 ('2'): (width=11, offset=76) */ |
|
1639 |
+ 0x01FC, 0x03FE, 0x07FF, 0x07FF, |
|
1640 |
+ 0x078F, 0x078F, 0x0780, 0x07C0, |
|
1641 |
+ 0x07E0, 0x03F0, 0x01F8, 0x00FC, |
|
1642 |
+ 0x007E, 0x003F, 0x001F, 0x07FF, |
|
1643 |
+ 0x07FF, 0x07FF, 0x07FF, |
|
1644 |
+ |
|
1645 |
+ /* character 0x33 ('3'): (width=11, offset=114) */ |
|
1646 |
+ 0x01FC, 0x03FE, 0x07FF, 0x07FF, |
|
1647 |
+ 0x078F, 0x078F, 0x0780, 0x07C0, |
|
1648 |
+ 0x03F0, 0x01F0, 0x03F0, 0x07C0, |
|
1649 |
+ 0x0780, 0x078F, 0x078F, 0x07FF, |
|
1650 |
+ 0x07FF, 0x03FE, 0x01FC, |
|
1651 |
+ |
|
1652 |
+ /* character 0x34 ('4'): (width=11, offset=152) */ |
|
1653 |
+ 0x003C, 0x07BC, 0x07BC, 0x079E, |
|
1654 |
+ 0x079E, 0x078F, 0x078F, 0x07FF, |
|
1655 |
+ 0x07FF, 0x07FF, 0x07FF, 0x0780, |
|
1656 |
+ 0x0780, 0x0780, 0x0780, 0x0780, |
|
1657 |
+ 0x0780, 0x0780, 0x0780, |
|
1658 |
+ |
|
1659 |
+ /* character 0x35 ('5'): (width=11, offset=190) */ |
|
1660 |
+ 0x07FF, 0x07FF, 0x07FF, 0x07FF, |
|
1661 |
+ 0x000F, 0x000F, 0x000F, 0x03FF, |
|
1662 |
+ 0x07FF, 0x07FF, 0x07FF, 0x0780, |
|
1663 |
+ 0x0780, 0x0780, 0x07C0, 0x07FF, |
|
1664 |
+ 0x03FF, 0x03FF, 0x00FF, |
|
1665 |
+ |
|
1666 |
+ /* character 0x36 ('6'): (width=11, offset=228) */ |
|
1667 |
+ 0x01F0, 0x01FC, 0x01FE, 0x01FE, |
|
1668 |
+ 0x001F, 0x000F, 0x000F, 0x01FF, |
|
1669 |
+ 0x03FF, 0x07FF, 0x07FF, 0x078F, |
|
1670 |
+ 0x078F, 0x078F, 0x078F, 0x07FF, |
|
1671 |
+ 0x07FF, 0x03FE, 0x01FC, |
|
1672 |
+ |
|
1673 |
+ /* character 0x37 ('7'): (width=11, offset=266) */ |
|
1674 |
+ 0x07FF, 0x07FF, 0x07FF, 0x07FF, |
|
1675 |
+ 0x0780, 0x07C0, 0x03C0, 0x03E0, |
|
1676 |
+ 0x01E0, 0x01F0, 0x00F0, 0x00F8, |
|
1677 |
+ 0x0078, 0x0078, 0x0078, 0x0078, |
|
1678 |
+ 0x0078, 0x0078, 0x0078, |
|
1679 |
+ |
|
1680 |
+ /* character 0x38 ('8'): (width=11, offset=304) */ |
|
1681 |
+ 0x01FC, 0x03FE, 0x07FF, 0x07FF, |
|
1682 |
+ 0x078F, 0x078F, 0x078F, 0x07FF, |
|
1683 |
+ 0x07FF, 0x03FE, 0x07FF, 0x078F, |
|
1684 |
+ 0x078F, 0x078F, 0x078F, 0x07FF, |
|
1685 |
+ 0x07FF, 0x03FE, 0x01FC, |
|
1686 |
+ |
|
1687 |
+ /* character 0x39 ('9'): (width=11, offset=342) */ |
|
1688 |
+ 0x01FC, 0x03FE, 0x07FF, 0x07FF, |
|
1689 |
+ 0x078F, 0x078F, 0x078F, 0x078F, |
|
1690 |
+ 0x07FF, 0x07FF, 0x07FE, 0x07FC, |
|
1691 |
+ 0x0780, 0x0780, 0x07C0, 0x03FC, |
|
1692 |
+ 0x03FC, 0x01FC, 0x007C, |
|
1693 |
+ |
|
1694 |
+ /* character 0x3A (':'): (width=4, offset=380) */ |
|
1695 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1696 |
+ 0x0006, 0x000F, 0x000F, 0x0006, |
|
1697 |
+ 0x0000, 0x0000, 0x0000, 0x0006, |
|
1698 |
+ 0x000F, 0x000F, 0x0006, 0x0000, |
|
1699 |
+ 0x0000, 0x0000, 0x0000, |
|
1700 |
+ |
|
1701 |
+ /* character 0x3B (';'): (width=11, offset=418) */ |
|
1702 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1703 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1704 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1705 |
+ 0x0000, 0x0000, 0x0000, 0x0000, |
|
1706 |
+ 0x0000, 0x0000, 0x0000, |
|
1707 |
+}; |
|
1708 |
+ |
|
1709 |
+const unsigned char MetaWatchTimeWidth[TOTAL_TIME_CHARACTERS] = |
|
1710 |
+{ |
|
1711 |
+/* width char hexcode */ |
|
1712 |
+/* ===== ==== ======= */ |
|
1713 |
+ 11, /* 0 30 */ |
|
1714 |
+ 11, /* 1 31 */ |
|
1715 |
+ 11, /* 2 32 */ |
|
1716 |
+ 11, /* 3 33 */ |
|
1717 |
+ 11, /* 4 34 */ |
|
1718 |
+ 11, /* 5 35 */ |
|
1719 |
+ 11, /* 6 36 */ |
|
1720 |
+ 11, /* 7 37 */ |
|
1721 |
+ 11, /* 8 38 */ |
|
1722 |
+ 11, /* 9 39 */ |
|
1723 |
+ 4, /* : 3A */ |
|
1724 |
+ 11, /* ' ' 3B */ |
|
1725 |
+}; |
|
1726 |
+ |
|
1727 |
+/******************************************************************************/ |
|
1728 |
+ |
|
1729 |
+const unsigned char MetaWatchMonospaced10[PRINTABLE_CHARACTERS][10] = |
|
1730 |
+{ |
|
1731 |
+ 0x00,0x00,0x10,0x38,0x38,0x10,0x10,0x00,0x10,0x00, |
|
1732 |
+ 0x00,0x00,0x6C,0x6C,0x24,0x00,0x00,0x00,0x00,0x00, |
|
1733 |
+ 0x00,0x00,0x00,0x28,0x7C,0x28,0x28,0x7C,0x28,0x00, |
|
1734 |
+ 0x00,0x00,0x10,0x70,0x08,0x30,0x40,0x38,0x20,0x00, |
|
1735 |
+ 0x00,0x00,0x4C,0x4C,0x20,0x10,0x08,0x64,0x64,0x00, |
|
1736 |
+ 0x00,0x00,0x08,0x14,0x14,0x08,0x54,0x24,0x58,0x00, |
|
1737 |
+ 0x00,0x00,0x18,0x18,0x10,0x08,0x00,0x00,0x00,0x00, |
|
1738 |
+ 0x00,0x00,0x10,0x08,0x08,0x08,0x08,0x08,0x10,0x00, |
|
1739 |
+ 0x00,0x00,0x10,0x20,0x20,0x20,0x20,0x20,0x10,0x00, |
|
1740 |
+ 0x00,0x00,0x92,0x54,0x38,0xFE,0x38,0x54,0x92,0x00, |
|
1741 |
+ 0x00,0x00,0x00,0x10,0x10,0x7C,0x10,0x10,0x00,0x00, |
|
1742 |
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x10,0x08, |
|
1743 |
+ 0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00, |
|
1744 |
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00, |
|
1745 |
+ 0x00,0x00,0x00,0x40,0x20,0x10,0x08,0x04,0x00,0x00, |
|
1746 |
+ 0x00,0x00,0x38,0x44,0x64,0x54,0x4C,0x44,0x38,0x00, |
|
1747 |
+ 0x00,0x00,0x10,0x18,0x10,0x10,0x10,0x10,0x38,0x00, |
|
1748 |
+ 0x00,0x00,0x38,0x44,0x40,0x30,0x08,0x04,0x7C,0x00, |
|
1749 |
+ 0x00,0x00,0x38,0x44,0x40,0x38,0x40,0x44,0x38,0x00, |
|
1750 |
+ 0x00,0x00,0x20,0x30,0x28,0x24,0x7C,0x20,0x20,0x00, |
|
1751 |
+ 0x00,0x00,0x7C,0x04,0x04,0x3C,0x40,0x44,0x38,0x00, |
|
1752 |
+ 0x00,0x00,0x30,0x08,0x04,0x3C,0x44,0x44,0x38,0x00, |
|
1753 |
+ 0x00,0x00,0x7C,0x40,0x20,0x10,0x08,0x08,0x08,0x00, |
|
1754 |
+ 0x00,0x00,0x38,0x44,0x44,0x38,0x44,0x44,0x38,0x00, |
|
1755 |
+ 0x00,0x00,0x38,0x44,0x44,0x78,0x40,0x20,0x18,0x00, |
|
1756 |
+ 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x00, |
|
1757 |
+ 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x10, |
|
1758 |
+ 0x00,0x00,0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x00, |
|
1759 |
+ 0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00, |
|
1760 |
+ 0x00,0x00,0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x00, |
|
1761 |
+ 0x00,0x00,0x38,0x44,0x40,0x30,0x10,0x00,0x10,0x00, |
|
1762 |
+ 0x00,0x00,0x38,0x44,0x74,0x54,0x74,0x04,0x38,0x00, |
|
1763 |
+ 0x00,0x00,0x38,0x44,0x44,0x44,0x7C,0x44,0x44,0x00, |
|
1764 |
+ 0x00,0x00,0x3C,0x44,0x44,0x3C,0x44,0x44,0x3C,0x00, |
|
1765 |
+ 0x00,0x00,0x38,0x44,0x04,0x04,0x04,0x44,0x38,0x00, |
|
1766 |
+ 0x00,0x00,0x3C,0x44,0x44,0x44,0x44,0x44,0x3C,0x00, |
|
1767 |
+ 0x00,0x00,0x7C,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00, |
|
1768 |
+ 0x00,0x00,0x7C,0x04,0x04,0x3C,0x04,0x04,0x04,0x00, |
|
1769 |
+ 0x00,0x00,0x38,0x44,0x04,0x74,0x44,0x44,0x78,0x00, |
|
1770 |
+ 0x00,0x00,0x44,0x44,0x44,0x7C,0x44,0x44,0x44,0x00, |
|
1771 |
+ 0x00,0x00,0x38,0x10,0x10,0x10,0x10,0x10,0x38,0x00, |
|
1772 |
+ 0x00,0x00,0x40,0x40,0x40,0x40,0x44,0x44,0x38,0x00, |
|
1773 |
+ 0x00,0x00,0x44,0x24,0x14,0x0C,0x14,0x24,0x44,0x00, |
|
1774 |
+ 0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x7C,0x00, |
|
1775 |
+ 0x00,0x00,0x44,0x6C,0x54,0x44,0x44,0x44,0x44,0x00, |
|
1776 |
+ 0x00,0x00,0x44,0x4C,0x54,0x64,0x44,0x44,0x44,0x00, |
|
1777 |
+ 0x00,0x00,0x38,0x44,0x44,0x44,0x44,0x44,0x38,0x00, |
|
1778 |
+ 0x00,0x00,0x3C,0x44,0x44,0x3C,0x04,0x04,0x04,0x00, |
|
1779 |
+ 0x00,0x00,0x38,0x44,0x44,0x44,0x54,0x24,0x58,0x00, |
|
1780 |
+ 0x00,0x00,0x3C,0x44,0x44,0x3C,0x24,0x44,0x44,0x00, |
|
1781 |
+ 0x00,0x00,0x38,0x44,0x04,0x38,0x40,0x44,0x38,0x00, |
|
1782 |
+ 0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x00, |
|
1783 |
+ 0x00,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00, |
|
1784 |
+ 0x00,0x00,0x44,0x44,0x44,0x44,0x44,0x28,0x10,0x00, |
|
1785 |
+ 0x00,0x00,0x44,0x44,0x54,0x54,0x54,0x54,0x28,0x00, |
|
1786 |
+ 0x00,0x00,0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x00, |
|
1787 |
+ 0x00,0x00,0x44,0x44,0x44,0x28,0x10,0x10,0x10,0x00, |
|
1788 |
+ 0x00,0x00,0x7C,0x40,0x20,0x10,0x08,0x04,0x7C,0x00, |
|
1789 |
+ 0x00,0x00,0x38,0x08,0x08,0x08,0x08,0x08,0x38,0x00, |
|
1790 |
+ 0x00,0x00,0x00,0x04,0x08,0x10,0x20,0x40,0x00,0x00, |
|
1791 |
+ 0x00,0x00,0x38,0x20,0x20,0x20,0x20,0x20,0x38,0x00, |
|
1792 |
+ 0x00,0x00,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x00, |
|
1793 |
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00, |
|
1794 |
+ 0x00,0x18,0x18,0x08,0x10,0x00,0x00,0x00,0x00,0x00, |
|
1795 |
+ 0x00,0x00,0x00,0x00,0x38,0x40,0x78,0x44,0x78,0x00, |
|
1796 |
+ 0x00,0x00,0x04,0x04,0x3C,0x44,0x44,0x44,0x3C,0x00, |
|
1797 |
+ 0x00,0x00,0x00,0x00,0x38,0x44,0x04,0x44,0x38,0x00, |
|
1798 |
+ 0x00,0x00,0x40,0x40,0x78,0x44,0x44,0x44,0x78,0x00, |
|
1799 |
+ 0x00,0x00,0x00,0x00,0x38,0x44,0x3C,0x04,0x38,0x00, |
|
1800 |
+ 0x00,0x00,0x60,0x10,0x10,0x78,0x10,0x10,0x10,0x00, |
|
1801 |
+ 0x00,0x00,0x00,0x78,0x44,0x44,0x78,0x40,0x38,0x00, |
|
1802 |
+ 0x00,0x00,0x08,0x08,0x38,0x48,0x48,0x48,0x48,0x00, |
|
1803 |
+ 0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x10,0x00, |
|
1804 |
+ 0x00,0x00,0x40,0x00,0x60,0x40,0x40,0x40,0x48,0x30, |
|
1805 |
+ 0x00,0x00,0x08,0x08,0x48,0x28,0x18,0x28,0x48,0x00, |
|
1806 |
+ 0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00, |
|
1807 |
+ 0x00,0x00,0x00,0x00,0x2C,0x54,0x54,0x44,0x44,0x00, |
|
1808 |
+ 0x00,0x00,0x00,0x00,0x38,0x48,0x48,0x48,0x48,0x00, |
|
1809 |
+ 0x00,0x00,0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, |
|
1810 |
+ 0x00,0x00,0x00,0x00,0x3C,0x44,0x44,0x3C,0x04,0x04, |
|
1811 |
+ 0x00,0x00,0x00,0x00,0x78,0x44,0x44,0x78,0x40,0x40, |
|
1812 |
+ 0x00,0x00,0x00,0x00,0x34,0x48,0x08,0x08,0x1C,0x00, |
|
1813 |
+ 0x00,0x00,0x00,0x00,0x38,0x04,0x38,0x40,0x38,0x00, |
|
1814 |
+ 0x00,0x00,0x00,0x10,0x78,0x10,0x10,0x50,0x20,0x00, |
|
1815 |
+ 0x00,0x00,0x00,0x00,0x48,0x48,0x48,0x68,0x50,0x00, |
|
1816 |
+ 0x00,0x00,0x00,0x00,0x44,0x44,0x44,0x28,0x10,0x00, |
|
1817 |
+ 0x00,0x00,0x00,0x00,0x44,0x44,0x54,0x7C,0x28,0x00, |
|
1818 |
+ 0x00,0x00,0x00,0x00,0x44,0x28,0x10,0x28,0x44,0x00, |
|
1819 |
+ 0x00,0x00,0x00,0x00,0x48,0x48,0x48,0x70,0x40,0x70, |
|
1820 |
+ 0x00,0x00,0x00,0x00,0x78,0x40,0x30,0x08,0x78,0x00, |
|
1821 |
+ 0x00,0x00,0x30,0x08,0x08,0x0C,0x08,0x08,0x30,0x00, |
|
1822 |
+ 0x00,0x00,0x10,0x10,0x10,0x00,0x10,0x10,0x10,0x00, |
|
1823 |
+ 0x00,0x00,0x18,0x20,0x20,0x60,0x20,0x20,0x18,0x00, |
|
1824 |
+ 0x00,0x00,0x00,0x50,0x28,0x00,0x00,0x00,0x00,0x00, |
|
1825 |
+}; |
|
1826 |
+ |
0 | 1827 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,121 @@ |
1 |
+//============================================================================== |
|
2 |
+// Copyright 2011 Meta Watch Ltd. - http://www.MetaWatch.org/ |
|
3 |
+// |
|
4 |
+// Licensed under the Meta Watch License, Version 1.0 (the "License"); |
|
5 |
+// you may not use this file except in compliance with the License. |
|
6 |
+// You may obtain a copy of the License at |
|
7 |
+// |
|
8 |
+// http://www.MetaWatch.org/licenses/license-1.0.html |
|
9 |
+// |
|
10 |
+// Unless required by applicable law or agreed to in writing, software |
|
11 |
+// distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
+// See the License for the specific language governing permissions and |
|
14 |
+// limitations under the License. |
|
15 |
+//============================================================================== |
|
16 |
+ |
|
17 |
+/******************************************************************************/ |
|
18 |
+/*! \file Fonts.h |
|
19 |
+* |
|
20 |
+* Fonts functions common to OLED and LCD version |
|
21 |
+* |
|
22 |
+* LCD is ROW based, OLED is column based |
|
23 |
+*/ |
|
24 |
+/******************************************************************************/ |
|
25 |
+ |
|
26 |
+#ifndef FONTS_H |
|
27 |
+#define FONTS_H |
|
28 |
+ |
|
29 |
+/*! There are three fonts defined for the MetaWatch LCD |
|
30 |
+ * they are 5, 7 and 16 pixels tall with variable width |
|
31 |
+ */ |
|
32 |
+typedef enum |
|
33 |
+{ |
|
34 |
+ MetaWatch5, |
|
35 |
+ MetaWatch7, |
|
36 |
+ MetaWatch16, |
|
37 |
+ MetaWatchTime, |
|
38 |
+ MetaWatch5Oled, |
|
39 |
+ MetaWatch7Oled, |
|
40 |
+ MetaWatch16Oled, |
|
41 |
+ MetaWatchIconOled |
|
42 |
+ |
|
43 |
+} etFontType; |
|
44 |
+ |
|
45 |
+/*! Use to size the bitmap used in the Display Task for printing characters FOR |
|
46 |
+ * THE LCD VERSION |
|
47 |
+ */ |
|
48 |
+#define MAX_FONT_ROWS ( 19 ) |
|
49 |
+ |
|
50 |
+/*! The maximum number of columns any font (or icon) requires. This is |
|
51 |
+ * used to define the size of the bitmap passed into font functions FOR THE |
|
52 |
+ * OLED version |
|
53 |
+ */ |
|
54 |
+#define MAX_FONT_COLUMNS ( 30 ) |
|
55 |
+ |
|
56 |
+#define TOTAL_TIME_CHARACTERS ( 12 ) |
|
57 |
+#define TIME_CHARACTER_COLON_INDEX ( 10 ) |
|
58 |
+#define TIME_CHARACTER_SPACE_INDEX ( 11 ) |
|
59 |
+ |
|
60 |
+/*! Convert a character into an index into the font table |
|
61 |
+ * |
|
62 |
+ * \param CharIn is the input character |
|
63 |
+ * \return Index into the table |
|
64 |
+ */ |
|
65 |
+unsigned char MapCharacterToIndex(unsigned char CharIn); |
|
66 |
+ |
|
67 |
+/*! Convert a digit (0-9) into an index into the font table |
|
68 |
+ * |
|
69 |
+ * \param Digit is a number |
|
70 |
+ * \return Index into the table |
|
71 |
+ */ |
|
72 |
+unsigned char MapDigitToIndex(unsigned char Digit); |
|
73 |
+ |
|
74 |
+/*! Get the bitmap for the specified character |
|
75 |
+ * |
|
76 |
+ * \param Character is the desired character |
|
77 |
+ * \param pBitmap pointer to an array of integers that holds the bitmap |
|
78 |
+ * |
|
79 |
+ * \note pBitmap must point to an object large enough to hold the largest bitmap |
|
80 |
+ * |
|
81 |
+ * \note For the LCD bitmaps the font height is the same as number of rows. |
|
82 |
+ * If the width is less than 8 then each row is a byte. |
|
83 |
+ * If the width is less than 16 but > 8 then each row is a word. |
|
84 |
+ * The function works with ints so that it is generic for both types |
|
85 |
+ * |
|
86 |
+ */ |
|
87 |
+void GetCharacterBitmap(unsigned char Character,unsigned int * pBitmap); |
|
88 |
+ |
|
89 |
+/*! Get the width for a specified character * |
|
90 |
+ * |
|
91 |
+ * \param Character is the desired character |
|
92 |
+ * \return Width of character in columns |
|
93 |
+ */ |
|
94 |
+unsigned char GetCharacterWidth(unsigned char Character); |
|
95 |
+ |
|
96 |
+/*! Set the font type used for future Get operations * |
|
97 |
+ * |
|
98 |
+ * \param Type of font |
|
99 |
+ */ |
|
100 |
+void SetFont(etFontType Type); |
|
101 |
+ |
|
102 |
+/*! Set the font spacing for the current font* |
|
103 |
+ * |
|
104 |
+ * \param Spacing is the number of columns between characters |
|
105 |
+ * |
|
106 |
+ * \note The characters do not have any 'natural' spacing between them |
|
107 |
+ */ |
|
108 |
+void SetFontSpacing(unsigned char Spacing); |
|
109 |
+ |
|
110 |
+/*! |
|
111 |
+ * \return The font spacing in columns |
|
112 |
+ */ |
|
113 |
+unsigned char GetFontSpacing(void); |
|
114 |
+ |
|
115 |
+ |
|
116 |
+/*! |
|
117 |
+ * \return The font height in rows |
|
118 |
+ */ |
|
119 |
+unsigned char GetCharacterHeight(void); |
|
120 |
+ |
|
121 |
+#endif /*FONTS_H*/ |
0 | 122 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,73 @@ |
1 |
+#include <time.h> |
|
2 |
+#include <stdio.h> |
|
3 |
+#include <string.h> |
|
4 |
+ |
|
5 |
+#include "oswald-ui.h" |
|
6 |
+#include "Fonts.h" |
|
7 |
+#include "LcdDisplay.h" |
|
8 |
+ |
|
9 |
+#define NUM_LCD_ROWS 96 |
|
10 |
+#define NUM_LCD_COL_BYTES ( 12 ) |
|
11 |
+#define MAX_FONT_ROWS ( 19 ) |
|
12 |
+ |
|
13 |
+ |
|
14 |
+gint WriteLcdCharacter(oswald_ui *ui, gint x, gint y, unsigned char Character) |
|
15 |
+{ |
|
16 |
+ gint CharacterHeight = GetCharacterHeight(); |
|
17 |
+ gint CharacterWidth = GetCharacterWidth(Character); |
|
18 |
+ unsigned int bitmap[MAX_FONT_ROWS]; |
|
19 |
+ gint lx, ly; |
|
20 |
+ |
|
21 |
+ GetCharacterBitmap(Character,(unsigned int*)&bitmap); |
|
22 |
+ |
|
23 |
+ // printf("cw=%d ch=%d\n", CharacterWidth, CharacterHeight); |
|
24 |
+ for (ly=0; ly<CharacterHeight; ly++) { |
|
25 |
+ for (lx=0; lx<CharacterWidth; lx++) { |
|
26 |
+ if (bitmap[ly] & (1<<lx)) { |
|
27 |
+ set_pixel(ui, lx+x, ly+y, TRUE); |
|
28 |
+ // printf("."); |
|
29 |
+ } else { |
|
30 |
+ set_pixel(ui, lx+x, ly+y, FALSE); |
|
31 |
+ // printf(" "); |
|
32 |
+ } |
|
33 |
+ } |
|
34 |
+ // printf("\n"); |
|
35 |
+ } |
|
36 |
+ |
|
37 |
+ return CharacterWidth + GetFontSpacing(); |
|
38 |
+} |
|
39 |
+ |
|
40 |
+void WriteLcdString(oswald_ui *ui, gint x, gint y, gchar *str) |
|
41 |
+{ |
|
42 |
+ gint lx, i; |
|
43 |
+ |
|
44 |
+ if (str == NULL || strlen(str)==0) |
|
45 |
+ return; |
|
46 |
+ |
|
47 |
+ lx = x; |
|
48 |
+ for (i=0; i<strlen(str); i++) { |
|
49 |
+ lx += WriteLcdCharacter(ui, lx, y, str[i]); |
|
50 |
+ } |
|
51 |
+} |
|
52 |
+ |
|
53 |
+ |
|
54 |
+void update_idle_time_date(oswald_ui *ui) |
|
55 |
+{ |
|
56 |
+ gint gRow = 3; |
|
57 |
+ gint gColumn = 4; |
|
58 |
+ static gchar secs = 0; |
|
59 |
+ |
|
60 |
+ SetFont(MetaWatchTime); |
|
61 |
+ |
|
62 |
+ //gRow += WriteLcdCharacter(ui, gRow, gColumn, TIME_CHARACTER_SPACE_INDEX); |
|
63 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, 2); |
|
64 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, 3); |
|
65 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, TIME_CHARACTER_COLON_INDEX); |
|
66 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, 1); |
|
67 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, 7); |
|
68 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, TIME_CHARACTER_COLON_INDEX); |
|
69 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, (secs / 10)); |
|
70 |
+ gRow += WriteLcdCharacter(ui, gRow, gColumn, (secs % 10)); |
|
71 |
+ secs = ++secs % 60; |
|
72 |
+} |
|
73 |
+ |
... | ... |
@@ -12,19 +12,15 @@ |
12 | 12 |
|
13 | 13 |
#include <gtk/gtk.h> |
14 | 14 |
|
15 |
+#include "oswald-ui.h" |
|
16 |
+#include "Fonts.h" // the MetaWatch fonts |
|
15 | 17 |
|
16 |
-typedef struct { |
|
17 |
- GtkWidget *mainwin; |
|
18 |
- GtkDrawingArea *darea; |
|
19 |
- GdkPixmap *pixmap; |
|
20 |
-} oswald_ui; |
|
21 |
- |
|
22 |
- |
|
18 |
+#define BITMAP_WIDTH 192 |
|
19 |
+#define BITMAP_HEIGHT 192 |
|
23 | 20 |
|
24 | 21 |
void set_pixel(oswald_ui *ui, gint x, gint y, gboolean state) |
25 | 22 |
{ |
26 | 23 |
GdkRectangle update_rect; |
27 |
- GdkGC *gc; |
|
28 | 24 |
gint ix, iy; |
29 | 25 |
|
30 | 26 |
ix = x*2; |
... | ... |
@@ -35,10 +31,29 @@ void set_pixel(oswald_ui *ui, gint x, gint y, gboolean state) |
35 | 31 |
update_rect.width = 10; |
36 | 32 |
update_rect.height = 10; |
37 | 33 |
|
38 |
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix, iy); |
|
39 |
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix+1, iy); |
|
40 |
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix, iy+1); |
|
41 |
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix+1, iy+1); |
|
34 |
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix, iy); |
|
35 |
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix+1, iy); |
|
36 |
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix, iy+1); |
|
37 |
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix+1, iy+1); |
|
38 |
+ |
|
39 |
+ gtk_widget_draw (GTK_WIDGET(ui->darea), &update_rect); |
|
40 |
+} |
|
41 |
+ |
|
42 |
+void clear_display(oswald_ui *ui) |
|
43 |
+{ |
|
44 |
+ GdkRectangle update_rect; |
|
45 |
+ |
|
46 |
+ update_rect.x = 0; |
|
47 |
+ update_rect.y = 0; |
|
48 |
+ update_rect.width = BITMAP_WIDTH; |
|
49 |
+ update_rect.height = BITMAP_HEIGHT; |
|
50 |
+ |
|
51 |
+ gdk_draw_rectangle (ui->pixmap, |
|
52 |
+ ui->darea->style->white_gc, |
|
53 |
+ TRUE, |
|
54 |
+ 0, 0, |
|
55 |
+ ui->darea->allocation.width, |
|
56 |
+ ui->darea->allocation.height); |
|
42 | 57 |
|
43 | 58 |
gtk_widget_draw (GTK_WIDGET(ui->darea), &update_rect); |
44 | 59 |
} |
... | ... |
@@ -96,18 +111,18 @@ static void create_mainwin(oswald_ui *ui) |
96 | 111 |
vb = gtk_vbox_new(FALSE, 5); |
97 | 112 |
gtk_box_pack_start (GTK_BOX(hb), vb, FALSE, FALSE, 5); |
98 | 113 |
|
99 |
- btn = gtk_button_new_with_label("D"); |
|
114 |
+ btn = gtk_button_new_with_label(" D "); |
|
100 | 115 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
101 | 116 |
|
102 |
- btn = gtk_button_new_with_label("E"); |
|
117 |
+ btn = gtk_button_new_with_label(" E "); |
|
103 | 118 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
104 | 119 |
|
105 |
- btn = gtk_button_new_with_label("F"); |
|
120 |
+ btn = gtk_button_new_with_label(" F "); |
|
106 | 121 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
107 | 122 |
|
108 |
- ui->darea = (GtkDrawingArea *)gtk_drawing_area_new (); |
|
123 |
+ ui->darea = gtk_drawing_area_new (); |
|
109 | 124 |
gtk_box_pack_start (GTK_BOX(hb), GTK_WIDGET(ui->darea), FALSE, FALSE, 5); |
110 |
- gtk_drawing_area_size (ui->darea, 192, 192); |
|
125 |
+ gtk_drawing_area_size (GTK_DRAWING_AREA(ui->darea), BITMAP_WIDTH, BITMAP_HEIGHT); |
|
111 | 126 |
|
112 | 127 |
gtk_signal_connect (GTK_OBJECT (ui->darea), "expose_event", (GtkSignalFunc) expose_event, ui); |
113 | 128 |
gtk_signal_connect (GTK_OBJECT (ui->darea), "configure_event", (GtkSignalFunc) configure_event, ui); |
... | ... |
@@ -123,18 +138,37 @@ static void create_mainwin(oswald_ui *ui) |
123 | 138 |
vb = gtk_vbox_new(FALSE, 5); |
124 | 139 |
gtk_box_pack_start (GTK_BOX(hb), vb, FALSE, FALSE, 5); |
125 | 140 |
|
126 |
- btn = gtk_button_new_with_label("A"); |
|
141 |
+ btn = gtk_button_new_with_label(" A "); |
|
127 | 142 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
128 | 143 |
|
129 |
- btn = gtk_button_new_with_label("B"); |
|
144 |
+ btn = gtk_button_new_with_label(" B "); |
|
130 | 145 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
131 | 146 |
|
132 |
- btn = gtk_button_new_with_label("C"); |
|
147 |
+ btn = gtk_button_new_with_label(" C "); |
|
133 | 148 |
gtk_box_pack_start (GTK_BOX(vb), btn, FALSE, FALSE, 10); |
134 | 149 |
|
135 | 150 |
gtk_widget_show_all(ui->mainwin); |
136 | 151 |
} |
137 | 152 |
|
153 |
+gboolean app_tmo_handler (gpointer userdata) |
|
154 |
+{ |
|
155 |
+ oswald_ui *ui = (oswald_ui *)userdata; |
|
156 |
+ |
|
157 |
+ // fprintf(stderr, "tmo...\n"); |
|
158 |
+ |
|
159 |
+ if (ui->OnIdleScreen) { |
|
160 |
+ update_idle_time_date(ui); |
|
161 |
+#if 0 |
|
162 |
+ } else { |
|
163 |
+ // go back to idle screen after IDLE_TIMEOUT seconds |
|
164 |
+ if ((time(NULL) - ui->idle_tmo) > ui->conf.idle_tmo /*IDLE_TIMEOUT*/) |
|
165 |
+ create_main_screen(ui); |
|
166 |
+#endif |
|
167 |
+ } |
|
168 |
+ |
|
169 |
+ return TRUE; |
|
170 |
+} |
|
171 |
+ |
|
138 | 172 |
int main(int argc , char ** argv) |
139 | 173 |
{ |
140 | 174 |
oswald_ui ui; |
... | ... |
@@ -143,7 +177,10 @@ int main(int argc , char ** argv) |
143 | 177 |
|
144 | 178 |
create_mainwin(&ui); |
145 | 179 |
|
146 |
- set_pixel(&ui, 48, 48, TRUE); |
|
180 |
+ //set_pixel(&ui, 48, 48, TRUE); |
|
181 |
+ // demo_time(&ui); |
|
182 |
+ ui.OnIdleScreen = TRUE; |
|
183 |
+ g_timeout_add_seconds(1, app_tmo_handler, &ui); |
|
147 | 184 |
|
148 | 185 |
gtk_main (); |
149 | 186 |
return 0; |