-
Notifications
You must be signed in to change notification settings - Fork 1
/
font_8x16_gen.c
299 lines (287 loc) · 18.7 KB
/
font_8x16_gen.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
const uint8_t ssd1306xled_font8x16[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0
0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x30, 0x00, 0x00, 0x00, // ! 1
0x00, 0x10, 0x0C, 0x06, 0x10, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // " 2
0x40, 0xC0, 0x78, 0x40, 0xC0, 0x78, 0x40, 0x00, 0x04, 0x3F, 0x04, 0x04, 0x3F, 0x04, 0x04, 0x00, // # 3
0x00, 0x70, 0x88, 0xFC, 0x08, 0x30, 0x00, 0x00, 0x00, 0x18, 0x20, 0xFF, 0x21, 0x1E, 0x00, 0x00, // $ 4
0xF0, 0x08, 0xF0, 0x00, 0xE0, 0x18, 0x00, 0x00, 0x00, 0x21, 0x1C, 0x03, 0x1E, 0x21, 0x1E, 0x00, // % 5
0x00, 0xF0, 0x08, 0x88, 0x70, 0x00, 0x00, 0x00, 0x1E, 0x21, 0x23, 0x24, 0x19, 0x27, 0x21, 0x10, // & 6
0x10, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ' 7
0x00, 0x00, 0x00, 0xE0, 0x18, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x00, // ( 8
0x00, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, // ) 9
0x40, 0x40, 0x80, 0xF0, 0x80, 0x40, 0x40, 0x00, 0x02, 0x02, 0x01, 0x0F, 0x01, 0x02, 0x02, 0x00, // * 10
0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x1F, 0x01, 0x01, 0x01, 0x00, // + 11
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, // , 12
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, // - 13
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // . 14
0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x04, 0x00, 0x60, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, // / 15
0x00, 0xE0, 0x10, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x00, 0x0F, 0x10, 0x20, 0x20, 0x10, 0x0F, 0x00, // 0 16
0x00, 0x10, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00, // 1 17
0x00, 0x70, 0x08, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, 0x30, 0x28, 0x24, 0x22, 0x21, 0x30, 0x00, // 2 18
0x00, 0x30, 0x08, 0x88, 0x88, 0x48, 0x30, 0x00, 0x00, 0x18, 0x20, 0x20, 0x20, 0x11, 0x0E, 0x00, // 3 19
0x00, 0x00, 0xC0, 0x20, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x07, 0x04, 0x24, 0x24, 0x3F, 0x24, 0x00, // 4 20
0x00, 0xF8, 0x08, 0x88, 0x88, 0x08, 0x08, 0x00, 0x00, 0x19, 0x21, 0x20, 0x20, 0x11, 0x0E, 0x00, // 5 21
0x00, 0xE0, 0x10, 0x88, 0x88, 0x18, 0x00, 0x00, 0x00, 0x0F, 0x11, 0x20, 0x20, 0x11, 0x0E, 0x00, // 6 22
0x00, 0x38, 0x08, 0x08, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, // 7 23
0x00, 0x70, 0x88, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, 0x1C, 0x22, 0x21, 0x21, 0x22, 0x1C, 0x00, // 8 24
0x00, 0xE0, 0x10, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x00, 0x00, 0x31, 0x22, 0x22, 0x11, 0x0F, 0x00, // 9 25
0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, // : 26
0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, // ; 27
0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x00, 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, // < 28
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, // = 29
0x00, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, // > 30
0x00, 0x70, 0x48, 0x08, 0x08, 0x08, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x36, 0x01, 0x00, 0x00, // ? 31
0xC0, 0x30, 0xC8, 0x28, 0xE8, 0x10, 0xE0, 0x00, 0x07, 0x18, 0x27, 0x24, 0x23, 0x14, 0x0B, 0x00, // @ 32
0x00, 0x00, 0xC0, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x20, 0x3C, 0x23, 0x02, 0x02, 0x27, 0x38, 0x20, // A 33
0x08, 0xF8, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x11, 0x0E, 0x00, // B 34
0xC0, 0x30, 0x08, 0x08, 0x08, 0x08, 0x38, 0x00, 0x07, 0x18, 0x20, 0x20, 0x20, 0x10, 0x08, 0x00, // C 35
0x08, 0xF8, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x10, 0x0F, 0x00, // D 36
0x08, 0xF8, 0x88, 0x88, 0xE8, 0x08, 0x10, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x23, 0x20, 0x18, 0x00, // E 37
0x08, 0xF8, 0x88, 0x88, 0xE8, 0x08, 0x10, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, // F 38
0xC0, 0x30, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x07, 0x18, 0x20, 0x20, 0x22, 0x1E, 0x02, 0x00, // G 39
0x08, 0xF8, 0x08, 0x00, 0x00, 0x08, 0xF8, 0x08, 0x20, 0x3F, 0x21, 0x01, 0x01, 0x21, 0x3F, 0x20, // H 40
0x00, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00, // I 41
0x00, 0x00, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x00, 0xC0, 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00, 0x00, // J 42
0x08, 0xF8, 0x88, 0xC0, 0x28, 0x18, 0x08, 0x00, 0x20, 0x3F, 0x20, 0x01, 0x26, 0x38, 0x20, 0x00, // K 43
0x08, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x20, 0x30, 0x00, // L 44
0x08, 0xF8, 0xF8, 0x00, 0xF8, 0xF8, 0x08, 0x00, 0x20, 0x3F, 0x00, 0x3F, 0x00, 0x3F, 0x20, 0x00, // M 45
0x08, 0xF8, 0x30, 0xC0, 0x00, 0x08, 0xF8, 0x08, 0x20, 0x3F, 0x20, 0x00, 0x07, 0x18, 0x3F, 0x00, // N 46
0xE0, 0x10, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x0F, 0x10, 0x20, 0x20, 0x20, 0x10, 0x0F, 0x00, // O 47
0x08, 0xF8, 0x08, 0x08, 0x08, 0x08, 0xF0, 0x00, 0x20, 0x3F, 0x21, 0x01, 0x01, 0x01, 0x00, 0x00, // P 48
0xE0, 0x10, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x0F, 0x18, 0x24, 0x24, 0x38, 0x50, 0x4F, 0x00, // Q 49
0x08, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x03, 0x0C, 0x30, 0x20, // R 50
0x00, 0x70, 0x88, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x38, 0x20, 0x21, 0x21, 0x22, 0x1C, 0x00, // S 51
0x18, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x00, 0x00, // T 52
0x08, 0xF8, 0x08, 0x00, 0x00, 0x08, 0xF8, 0x08, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, // U 53
0x08, 0x78, 0x88, 0x00, 0x00, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x07, 0x38, 0x0E, 0x01, 0x00, 0x00, // V 54
0xF8, 0x08, 0x00, 0xF8, 0x00, 0x08, 0xF8, 0x00, 0x03, 0x3C, 0x07, 0x00, 0x07, 0x3C, 0x03, 0x00, // W 55
0x08, 0x18, 0x68, 0x80, 0x80, 0x68, 0x18, 0x08, 0x20, 0x30, 0x2C, 0x03, 0x03, 0x2C, 0x30, 0x20, // X 56
0x08, 0x38, 0xC8, 0x00, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x00, 0x00, // Y 57
0x10, 0x08, 0x08, 0x08, 0xC8, 0x38, 0x08, 0x00, 0x20, 0x38, 0x26, 0x21, 0x20, 0x20, 0x18, 0x00, // Z 58
0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x00, // [ 59
0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x38, 0xC0, 0x00, // \ 60
0x00, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x7F, 0x00, 0x00, 0x00, // ] 61
0x00, 0x00, 0x04, 0x02, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^ 62
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, // _ 63
0x00, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ` 64
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x19, 0x24, 0x22, 0x22, 0x22, 0x3F, 0x20, // a 65
0x08, 0xF8, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x11, 0x20, 0x20, 0x11, 0x0E, 0x00, // b 66
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0x20, 0x11, 0x00, // c 67
0x00, 0x00, 0x00, 0x80, 0x80, 0x88, 0xF8, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0x10, 0x3F, 0x20, // d 68
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x22, 0x22, 0x22, 0x22, 0x13, 0x00, // e 69
0x00, 0x80, 0x80, 0xF0, 0x88, 0x88, 0x88, 0x18, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00, // f 70
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x6B, 0x94, 0x94, 0x94, 0x93, 0x60, 0x00, // g 71
0x08, 0xF8, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x3F, 0x21, 0x00, 0x00, 0x20, 0x3F, 0x20, // h 72
0x00, 0x80, 0x98, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00, // i 73
0x00, 0x00, 0x00, 0x80, 0x98, 0x98, 0x00, 0x00, 0x00, 0xC0, 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00, // j 74
0x08, 0xF8, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x20, 0x3F, 0x24, 0x02, 0x2D, 0x30, 0x20, 0x00, // k 75
0x00, 0x08, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00, // l 76
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x3F, 0x20, 0x00, 0x3F, // m 77
0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x3F, 0x21, 0x00, 0x00, 0x20, 0x3F, 0x20, // n 78
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, // o 79
0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xA1, 0x20, 0x20, 0x11, 0x0E, 0x00, // p 80
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0xA0, 0xFF, 0x80, // q 81
0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x20, 0x20, 0x3F, 0x21, 0x20, 0x00, 0x01, 0x00, // r 82
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x33, 0x24, 0x24, 0x24, 0x24, 0x19, 0x00, // s 83
0x00, 0x80, 0x80, 0xE0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x00, 0x00, // t 84
0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x10, 0x3F, 0x20, // u 85
0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x01, 0x0E, 0x30, 0x08, 0x06, 0x01, 0x00, // v 86
0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, 0x0F, 0x30, 0x0C, 0x03, 0x0C, 0x30, 0x0F, 0x00, // w 87
0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x31, 0x2E, 0x0E, 0x31, 0x20, 0x00, // x 88
0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x81, 0x8E, 0x70, 0x18, 0x06, 0x01, 0x00, // y 89
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x21, 0x30, 0x2C, 0x22, 0x21, 0x30, 0x00, // z 90
0x00, 0x00, 0x00, 0x00, 0x80, 0x7C, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x40, 0x40, // { 91
0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, // | 92
0x00, 0x02, 0x02, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x3F, 0x00, 0x00, 0x00, 0x00, // } 93
0x00, 0x06, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ~ 94
};
static const uint16_t Font16x8[] = {
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, // <space>
0x0000,0x0000,0x0000,0x33ff,0x0000,0x0000,0x0000,0x0000, // !
0x0000,0x0000,0x003f,0x0000,0x0000,0x003f,0x0000,0x0000, // "
0x0000,0x0330,0x3fff,0x0330,0x0330,0x3fff,0x0330,0x0000, // #
0x0000,0x0c30,0x0ccc,0x3fff,0x0ccc,0x030c,0x0000,0x0000, // $
0x0000,0x303c,0x0c3c,0x0300,0x00c0,0x3c30,0x3c0c,0x0000, // %
0x0000,0x0f3c,0x30c3,0x30c3,0x333c,0x0c00,0x3300,0x0000, // &
0x0000,0x0000,0x0000,0x003f,0x0000,0x0000,0x0000,0x0000, // '
0x0000,0x03f0,0x0c0c,0x3003,0x0000,0x0000,0x0000,0x0000, // (
0x0000,0x0000,0x0000,0x3003,0x0c0c,0x03f0,0x0000,0x0000, // )
0x0000,0x0c0c,0x0330,0x3fff,0x0330,0x0c0c,0x0000,0x0000, // *
0x0000,0x00c0,0x00c0,0x0ffc,0x00c0,0x00c0,0x0000,0x0000, // +
0x0000,0x0000,0x0000,0x3000,0x0f00,0x0000,0x0000,0x0000, // ,
0x0000,0x00c0,0x00c0,0x00c0,0x00c0,0x00c0,0x00c0,0x0000, // -
0x0000,0x0000,0x0000,0x3000,0x0000,0x0000,0x0000,0x0000, // .
0x0000,0x3000,0x0c00,0x0300,0x00c0,0x0030,0x000c,0x0000, // /
0x0000,0x0ffc,0x3303,0x30c3,0x30c3,0x3033,0x0ffc,0x0000, // 0
0x0000,0x0000,0x0000,0x300c,0x3fff,0x3000,0x0000,0x0000, // 1
0x0000,0x3c0c,0x3303,0x30c3,0x30c3,0x30c3,0x303c,0x0000, // 2
0x0000,0x0c03,0x3003,0x30c3,0x30c3,0x30f3,0x0f0f,0x0000, // 3
0x0000,0x0300,0x03c0,0x0330,0x030c,0x3fff,0x0300,0x0000, // 4
0x0000,0x0c3f,0x3033,0x3033,0x3033,0x3033,0x0fc3,0x0000, // 5
0x0000,0x0ff0,0x30cc,0x30c3,0x30c3,0x30c3,0x0f03,0x0000, // 6
0x0000,0x0003,0x0003,0x3f03,0x00c3,0x0033,0x000f,0x0000, // 7
0x0000,0x0f3c,0x30c3,0x30c3,0x30c3,0x30c3,0x0f3c,0x0000, // 8
0x0000,0x303c,0x30c3,0x30c3,0x30c3,0x0cc3,0x03fc,0x0000, // 9
0x0000,0x0000,0x0000,0x0330,0x0000,0x0000,0x0000,0x0000, // :
0x0000,0x0000,0x0000,0x1000,0x0f30,0x0000,0x0000,0x0000, // ;
0x0000,0x0000,0x00c0,0x0330,0x0c0c,0x3003,0x0000,0x0000, // <
0x0000,0x0330,0x0330,0x0330,0x0330,0x0330,0x0330,0x0000, // =
0x0000,0x0000,0x3003,0x0c0c,0x0330,0x00c0,0x0000,0x0000, // >
0x0000,0x000c,0x0003,0x0000,0x0000,0x0000,0x0000,0x0000, // ?
0x0000,0x0ffc,0x3003,0x30c3,0x3333,0x33c3,0x30fc,0x0000, // @
0x0000,0x3ff0,0x030c,0x0303,0x0303,0x030c,0x3ff0,0x0000, // A
0x0000,0x3fff,0x30c3,0x30c3,0x30c3,0x30c3,0x0f3c,0x0000, // B
0x0000,0x0ffc,0x3003,0x3003,0x3003,0x3003,0x0c0c,0x0000, // C
0x0000,0x3fff,0x3003,0x3003,0x3003,0x3003,0x0ffc,0x0000, // D
0x0000,0x3fff,0x30c3,0x30c3,0x30c3,0x30c3,0x3003,0x0000, // E
0x0000,0x3fff,0x00c3,0x00c3,0x00c3,0x00c3,0x0003,0x0000, // F
0x0000,0x0ffc,0x3003,0x3003,0x3183,0x3183,0x3f83,0x0000, // G
0x0000,0x3fff,0x00c0,0x00c0,0x00c0,0x00c0,0x3fff,0x0000, // H
0x0000,0x0000,0x3003,0x3fff,0x3003,0x0000,0x0000,0x0000, // I
0x0000,0x0c00,0x3000,0x3000,0x3000,0x3000,0x0fff,0x0000, // J
0x0000,0x3fff,0x00c0,0x00c0,0x0330,0x0c0c,0x3003,0x0000, // K
0x0000,0x3fff,0x3000,0x3000,0x3000,0x3000,0x3000,0x0000, // L
0x0000,0x3fff,0x000c,0x00f0,0x00f0,0x000c,0x3fff,0x0000, // M
0x0000,0x3fff,0x000c,0x00f0,0x03c0,0x0c00,0x3fff,0x0000, // N
0x0000,0x0ffc,0x3003,0x3003,0x3003,0x3003,0x0ffc,0x0000, // O
0x0000,0x3fff,0x00c3,0x00c3,0x00c3,0x00c3,0x003c,0x0000, // P
0x0000,0x0ffc,0x3003,0x3003,0x3303,0x0c03,0x33fc,0x0000, // Q
0x0000,0x3fff,0x00c3,0x00c3,0x03c3,0x0cc3,0x303c,0x0000, // R
0x0000,0x0c3c,0x30c3,0x30c3,0x30c3,0x30c3,0x0f0c,0x0000, // S
0x0000,0x0003,0x0003,0x3fff,0x0003,0x0003,0x0000,0x0000, // T
0x0000,0x0fff,0x3000,0x3000,0x3000,0x3000,0x0fff,0x0000, // U
0x0000,0x03ff,0x0c00,0x3000,0x3000,0x0c00,0x03ff,0x0000, // V
0x0000,0x3fff,0x0c00,0x03c0,0x03c0,0x0c00,0x3fff,0x0000, // W
0x0000,0x3c0f,0x0330,0x00c0,0x00c0,0x0330,0x3c0f,0x0000, // X
0x0000,0x000f,0x0030,0x3fc0,0x0030,0x000f,0x0000,0x0000, // Y
0x0000,0x3c03,0x3303,0x30c3,0x30c3,0x3033,0x300f,0x0000, // Z
0x0000,0x3fff,0x3fff,0x3003,0x3003,0x3003,0x3003,0x0000, // [
0x0000,0x000c,0x0030,0x00c0,0x0300,0x0c00,0x3000,0x0000, // <backslash>
0x0000,0x3003,0x3003,0x3003,0x3003,0x3fff,0x3fff,0x0000, // ]
0x0000,0x0300,0x00c0,0x0030,0x00c0,0x0300,0x0000,0x0000, // ^
0x0000,0x3000,0x3000,0x3000,0x3000,0x3000,0x3000,0x0000, // _
0x0000,0x0000,0x0003,0x000c,0x0030,0x0000,0x0000,0x0000, // `
0x0000,0x0c00,0x3330,0x3330,0x3330,0x3330,0x3fc0,0x0000, // a
0x0000,0x3fff,0x3030,0x3030,0x3030,0x3030,0x0fc0,0x0000, // b
0x0000,0x0fc0,0x3030,0x3030,0x3030,0x3030,0x3030,0x0000, // c
0x0000,0x0fc0,0x3030,0x3030,0x3030,0x3030,0x3fff,0x0000, // d
0x0000,0x0fc0,0x3330,0x3330,0x3330,0x3330,0x33c0,0x0000, // e
0x0000,0x00c0,0x3ffc,0x00c3,0x00c3,0x00c3,0x000c,0x0000, // f
0x0000,0x03c0,0xcc30,0xcc30,0xcc30,0xcc30,0x3fc0,0x0000, // g
0x0000,0x3fff,0x0030,0x0030,0x0030,0x0030,0x3fc0,0x0000, // h
0x0000,0x0000,0x3030,0x3ff3,0x3000,0x0000,0x0000,0x0000, // i
0x0000,0x3000,0xc030,0xc030,0xc030,0x3ff3,0x0000,0x0000, // j
0x0000,0x3fff,0x0300,0x0300,0x0300,0x0cc0,0x3030,0x0000, // k
0x0000,0x0000,0x3003,0x3fff,0x3000,0x0000,0x0000,0x0000, // l
0x0000,0x3ff0,0x0030,0x0fc0,0x0fc0,0x0030,0x3ff0,0x0000, // m
0x0000,0x3ff0,0x0030,0x0030,0x0030,0x0030,0x3fc0,0x0000, // n
0x0000,0x0fc0,0x3030,0x3030,0x3030,0x3030,0x0fc0,0x0000, // o
0x0000,0xfff0,0x0c30,0x0c30,0x0c30,0x0c30,0x03c0,0x0000, // p
0x0000,0x03c0,0x0c30,0x0c30,0x0c30,0x0c30,0xfff0,0x0000, // q
0x0000,0x3ff0,0x00c0,0x0030,0x0030,0x0030,0x0030,0x0000, // r
0x0000,0x30c0,0x3330,0x3330,0x3330,0x3330,0x0c30,0x0000, // s
0x0000,0x0030,0x0030,0x0fff,0x3030,0x3030,0x0c00,0x0000, // t
0x0000,0x0ff0,0x3000,0x3000,0x3000,0x0c00,0x3ff0,0x0000, // u
0x0000,0x03f0,0x0c00,0x3000,0x3000,0x0c00,0x03f0,0x0000, // v
0x0000,0x3ff0,0x3000,0x0f00,0x0f00,0x3000,0x3ff0,0x0000, // w
0x0000,0x3030,0x0cc0,0x0300,0x0300,0x0cc0,0x3030,0x0000, // x
0x0000,0x03f0,0xcc00,0xcc00,0xcc00,0xcc00,0x3ff0,0x0000, // y
0x0000,0x3030,0x3c30,0x3330,0x3330,0x30f0,0x3030,0x0000, // z
0x0000,0x00c0,0x00c0,0x0ffc,0x3f3f,0x3003,0x3003,0x0000, // {
0x0000,0x0000,0x0000,0x3fff,0x0000,0x0000,0x0000,0x0000, // |
0x0000,0x3003,0x3003,0x3f3f,0x0ffc,0x00c0,0x00c0,0x0000, // }
0x0000,0x03c0,0x0030,0x00c0,0x0300,0x00f0,0x0000,0x0000 // ~
};
int main(int argv, char** argc) {
int i, fd;
uint8_t *org_font = (uint8_t*)ssd1306xled_font8x16 + (17 << 4);
uint8_t font8[16];
uint8_t font16[8];
uint8_t *_pf = (uint8_t*)ssd1306xled_font8x16;
uint16_t *_ph = (uint16_t*)_pf;
//fd = fopen("_out_font.h", "rw");
int idx, jdx, x, y;
#if 1
printf("static const uint16_t Font8x16[] = {\n");
for(i=0; i<95; i++, _pf += 16) {
for(y=0,jdx=1; y<8; y++,jdx<<=1) {
font8[y] = 0;
font8[y+8] = 0;
for(x=0; x<8; x++) {
font8[y] <<= 1;
font8[y+8] <<= 1;
font8[y] |= (_pf[x] & jdx)?1:0;
font8[y+8] |= (_pf[x+8] & jdx)?1:0;
}
}
//printf("\t0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, \n",
// font[0], font[1], font[2], font[3], font[4], font[5], font[6], font[7]);
printf(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, "
"0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, \n",
font8[0], font8[1], font8[2], font8[3], font8[4], font8[5], font8[6], font8[7],
font8[8], font8[9], font8[10], font8[11], font8[12], font8[13], font8[14], font8[15]);
}
printf("};\n");
#endif
#if 0
_pf = org_font;
for(y=0,jdx=1; y<8; y+=1,jdx<<=1) {
font8[y] = 0;
font8[y+8] = 0;
for(x=0; x<8; x++) {
font8[y] <<= 1;
font8[y+8] <<= 1;
font8[y] |= (_pf[x] & jdx)?1:0;
font8[y+8] |= (_pf[x+8] & jdx)?1:0;
}
}
org_font = (uint8_t*)font8;
#endif
#if 0
for(y=0; y<16; y++) {
for(x=0, idx=128; x<8; x++, idx>>=1) {
printf("%c", (org_font[y] & idx)?'@':'.');
}
printf("\n");
}
printf("\n");
for(y=0; y<16; y++) {
for(x=0, idx=1; x<8; x++, idx<<=1) {
printf("%c", (org_font[y] & idx)?'@':'.');
}
printf("\n");
}
printf("\n");
for(y=0,jdx=128; y<16; y+=2,jdx>>=1) {
for(x=1; x<8; x+=1) {
printf("%c", (org_font[x] & jdx)?'@':'.');
}
printf("\n");
}
for(y=0,jdx=128; y<16; y+=2,jdx>>=1) {
for(x=0; x<8; x+=1) {
printf("%c", (org_font[x] & jdx)?'@':'.');
}
printf("\n");
}
printf("\n");
for(y=0,jdx=1; y<16; y+=2,jdx<<=1) {
for(x=0; x<8; x+=1) {
printf("%c", (org_font[x] & jdx)?'@':'.');
}
printf("\n");
}
for(y=0,jdx=1; y<16; y+=2,jdx<<=1) {
for(x=8; x<16; x+=1) {
printf("%c", (org_font[x] & jdx)?'@':'.');
}
printf("\n");
}
printf("\n");
#endif
return 0;
}