26 static unsigned int font_data [256][8] = {
27 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
28 { 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e },
29 { 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e },
30 { 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00 },
31 { 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00 },
32 { 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0xd6, 0x10, 0x38 },
33 { 0x10, 0x38, 0x7c, 0xfe, 0xfe, 0x7c, 0x10, 0x38 },
34 { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 },
35 { 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff },
36 { 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00 },
37 { 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff },
38 { 0x0f, 0x07, 0x0f, 0x7d, 0xcc, 0xcc, 0xcc, 0x78 },
39 { 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18 },
40 { 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x70, 0xf0, 0xe0 },
41 { 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x67, 0xe6, 0xc0 },
42 { 0x18, 0xdb, 0x3c, 0xe7, 0xe7, 0x3c, 0xdb, 0x18 },
43 { 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, 0x00 },
44 { 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, 0x00 },
45 { 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x7e, 0x3c, 0x18 },
46 { 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00 },
47 { 0x7f, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x00 },
48 { 0x3e, 0x61, 0x3c, 0x66, 0x66, 0x3c, 0x86, 0x7c },
49 { 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x00 },
50 { 0x18, 0x3c, 0x7e, 0x18, 0x7e, 0x3c, 0x18, 0xff },
51 { 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00 },
52 { 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00 },
53 { 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00 },
54 { 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00 },
55 { 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00 },
56 { 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00 },
57 { 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, 0x00 },
58 { 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, 0x00 },
59 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
60 { 0x18, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x00 },
61 { 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00 },
62 { 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, 0x00 },
63 { 0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00 },
64 { 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, 0x00 },
65 { 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, 0x00 },
66 { 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00 },
67 { 0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00 },
68 { 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00 },
69 { 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00 },
70 { 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00 },
71 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30 },
72 { 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00 },
73 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00 },
74 { 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00 },
75 { 0x38, 0x6c, 0xc6, 0xd6, 0xc6, 0x6c, 0x38, 0x00 },
76 { 0x18, 0x38, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00 },
77 { 0x7c, 0xc6, 0x06, 0x1c, 0x30, 0x66, 0xfe, 0x00 },
78 { 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c, 0x00 },
79 { 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x1e, 0x00 },
80 { 0xfe, 0xc0, 0xc0, 0xfc, 0x06, 0xc6, 0x7c, 0x00 },
81 { 0x38, 0x60, 0xc0, 0xfc, 0xc6, 0xc6, 0x7c, 0x00 },
82 { 0xfe, 0xc6, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x00 },
83 { 0x7c, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0x7c, 0x00 },
84 { 0x7c, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00 },
85 { 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00 },
86 { 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30 },
87 { 0x06, 0x0c, 0x18, 0x30, 0x18, 0x0c, 0x06, 0x00 },
88 { 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00 },
89 { 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00 },
90 { 0x7c, 0xc6, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x00 },
91 { 0x7c, 0xc6, 0xde, 0xde, 0xde, 0xc0, 0x78, 0x00 },
92 { 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00 },
93 { 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00 },
94 { 0x3c, 0x66, 0xc0, 0xc0, 0xc0, 0x66, 0x3c, 0x00 },
95 { 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00 },
96 { 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00 },
97 { 0xfe, 0x62, 0x68, 0x78, 0x68, 0x60, 0xf0, 0x00 },
98 { 0x3c, 0x66, 0xc0, 0xc0, 0xce, 0x66, 0x3a, 0x00 },
99 { 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00 },
100 { 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00 },
101 { 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00 },
102 { 0xe6, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6, 0x00 },
103 { 0xf0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00 },
104 { 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0x00 },
105 { 0xc6, 0xe6, 0xf6, 0xde, 0xce, 0xc6, 0xc6, 0x00 },
106 { 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
107 { 0xfc, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00 },
108 { 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7c, 0x0e },
109 { 0xfc, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0xe6, 0x00 },
110 { 0x3c, 0x66, 0x30, 0x18, 0x0c, 0x66, 0x3c, 0x00 },
111 { 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x3c, 0x00 },
112 { 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
113 { 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00 },
114 { 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00 },
115 { 0xc6, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0xc6, 0x00 },
116 { 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x00 },
117 { 0xfe, 0xc6, 0x8c, 0x18, 0x32, 0x66, 0xfe, 0x00 },
118 { 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00 },
119 { 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, 0x00 },
120 { 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00 },
121 { 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00 },
122 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff },
123 { 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00 },
124 { 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
125 { 0xe0, 0x60, 0x7c, 0x66, 0x66, 0x66, 0xdc, 0x00 },
126 { 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc6, 0x7c, 0x00 },
127 { 0x1c, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
128 { 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0x7c, 0x00 },
129 { 0x3c, 0x66, 0x60, 0xf8, 0x60, 0x60, 0xf0, 0x00 },
130 { 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8 },
131 { 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0xe6, 0x00 },
132 { 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00 },
133 { 0x06, 0x00, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c },
134 { 0xe0, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0xe6, 0x00 },
135 { 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00 },
136 { 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0x00 },
137 { 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x00 },
138 { 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
139 { 0x00, 0x00, 0xdc, 0x66, 0x66, 0x7c, 0x60, 0xf0 },
140 { 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0x1e },
141 { 0x00, 0x00, 0xdc, 0x76, 0x60, 0x60, 0xf0, 0x00 },
142 { 0x00, 0x00, 0x7e, 0xc0, 0x7c, 0x06, 0xfc, 0x00 },
143 { 0x30, 0x30, 0xfc, 0x30, 0x30, 0x36, 0x1c, 0x00 },
144 { 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
145 { 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00 },
146 { 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00 },
147 { 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0x00 },
148 { 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc },
149 { 0x00, 0x00, 0x7e, 0x4c, 0x18, 0x32, 0x7e, 0x00 },
150 { 0x0e, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0e, 0x00 },
151 { 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00 },
152 { 0x70, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x70, 0x00 },
153 { 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
154 { 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00 },
155 { 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x0c, 0x78 },
156 { 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
157 { 0x0c, 0x18, 0x7c, 0xc6, 0xfe, 0xc0, 0x7c, 0x00 },
158 { 0x7c, 0x82, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
159 { 0xc6, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
160 { 0x30, 0x18, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
161 { 0x30, 0x30, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
162 { 0x00, 0x00, 0x7e, 0xc0, 0xc0, 0x7e, 0x0c, 0x38 },
163 { 0x7c, 0x82, 0x7c, 0xc6, 0xfe, 0xc0, 0x7c, 0x00 },
164 { 0xc6, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0x7c, 0x00 },
165 { 0x30, 0x18, 0x7c, 0xc6, 0xfe, 0xc0, 0x7c, 0x00 },
166 { 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00 },
167 { 0x7c, 0x82, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00 },
168 { 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00 },
169 { 0xc6, 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00 },
170 { 0x38, 0x6c, 0x7c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00 },
171 { 0x18, 0x30, 0xfe, 0xc0, 0xf8, 0xc0, 0xfe, 0x00 },
172 { 0x00, 0x00, 0x7e, 0x18, 0x7e, 0xd8, 0x7e, 0x00 },
173 { 0x3e, 0x6c, 0xcc, 0xfe, 0xcc, 0xcc, 0xce, 0x00 },
174 { 0x7c, 0x82, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
175 { 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
176 { 0x30, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
177 { 0x78, 0x84, 0x00, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
178 { 0x60, 0x30, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
179 { 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc },
180 { 0xc6, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x00 },
181 { 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
182 { 0x18, 0x18, 0x7e, 0xc0, 0xc0, 0x7e, 0x18, 0x18 },
183 { 0x38, 0x6c, 0x64, 0xf0, 0x60, 0x66, 0xfc, 0x00 },
184 { 0x66, 0x66, 0x3c, 0x7e, 0x18, 0x7e, 0x18, 0x18 },
185 { 0xf8, 0xcc, 0xcc, 0xfa, 0xc6, 0xcf, 0xc6, 0xc7 },
186 { 0x0e, 0x1b, 0x18, 0x3c, 0x18, 0xd8, 0x70, 0x00 },
187 { 0x18, 0x30, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00 },
188 { 0x0c, 0x18, 0x00, 0x38, 0x18, 0x18, 0x3c, 0x00 },
189 { 0x0c, 0x18, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00 },
190 { 0x18, 0x30, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00 },
191 { 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x00 },
192 { 0x76, 0xdc, 0x00, 0xe6, 0xf6, 0xde, 0xce, 0x00 },
193 { 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00 },
194 { 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00 },
195 { 0x18, 0x00, 0x18, 0x18, 0x30, 0x63, 0x3e, 0x00 },
196 { 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0x00, 0x00 },
197 { 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x00, 0x00 },
198 { 0x63, 0xe6, 0x6c, 0x7e, 0x33, 0x66, 0xcc, 0x0f },
199 { 0x63, 0xe6, 0x6c, 0x7a, 0x36, 0x6a, 0xdf, 0x06 },
200 { 0x18, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x18, 0x00 },
201 { 0x00, 0x33, 0x66, 0xcc, 0x66, 0x33, 0x00, 0x00 },
202 { 0x00, 0xcc, 0x66, 0x33, 0x66, 0xcc, 0x00, 0x00 },
203 { 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88 },
204 { 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa },
205 { 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd },
206 { 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18 },
207 { 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18 },
208 { 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18 },
209 { 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36 },
210 { 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36 },
211 { 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18 },
212 { 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36 },
213 { 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 },
214 { 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36 },
215 { 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00 },
216 { 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00 },
217 { 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00 },
218 { 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18 },
219 { 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00 },
220 { 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00 },
221 { 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18 },
222 { 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18 },
223 { 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00 },
224 { 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18 },
225 { 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18 },
226 { 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36 },
227 { 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00 },
228 { 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36 },
229 { 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00 },
230 { 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36 },
231 { 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36 },
232 { 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00 },
233 { 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36 },
234 { 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00 },
235 { 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00 },
236 { 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18 },
237 { 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36 },
238 { 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00 },
239 { 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00 },
240 { 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18 },
241 { 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36 },
242 { 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36 },
243 { 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18 },
244 { 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00 },
245 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18 },
246 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
247 { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff },
248 { 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0 },
249 { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f },
250 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 },
251 { 0x00, 0x00, 0x76, 0xdc, 0xc8, 0xdc, 0x76, 0x00 },
252 { 0x78, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xcc, 0x00 },
253 { 0xfe, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00 },
254 { 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x00 },
255 { 0xfe, 0xc6, 0x60, 0x30, 0x60, 0xc6, 0xfe, 0x00 },
256 { 0x00, 0x00, 0x7e, 0xd8, 0xd8, 0xd8, 0x70, 0x00 },
257 { 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7c, 0xc0 },
258 { 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x00 },
259 { 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x3c, 0x18, 0x7e },
260 { 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0x6c, 0x38, 0x00 },
261 { 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x6c, 0xee, 0x00 },
262 { 0x0e, 0x18, 0x0c, 0x3e, 0x66, 0x66, 0x3c, 0x00 },
263 { 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0x7e, 0x00, 0x00 },
264 { 0x06, 0x0c, 0x7e, 0xdb, 0xdb, 0x7e, 0x60, 0xc0 },
265 { 0x1e, 0x30, 0x60, 0x7e, 0x60, 0x30, 0x1e, 0x00 },
266 { 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00 },
267 { 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x00 },
268 { 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x00 },
269 { 0x30, 0x18, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00 },
270 { 0x0c, 0x18, 0x30, 0x18, 0x0c, 0x00, 0x7e, 0x00 },
271 { 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18 },
272 { 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x70 },
273 { 0x00, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x00, 0x00 },
274 { 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00 },
275 { 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00 },
276 { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00 },
277 { 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00 },
278 { 0x0f, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x3c, 0x1c },
279 { 0x6c, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00 },
280 { 0x78, 0x0c, 0x18, 0x30, 0x7c, 0x00, 0x00, 0x00 },
281 { 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00 },
282 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
285 unsigned int * Gr::Glyph::row(
char c )
287 size_t index =
static_cast<size_t>(
static_cast<unsigned char>(c)) ;
288 G_ASSERT( index <= 0xffU ) ;
289 index = index & 0xffU ;
290 return font_data[index] ;
295 typedef std::vector<std::vector<bool> > matrix_t ;
298 unsigned int * row_data = row( c ) ;
299 for(
int dy = 0 ; dy < 8 ; dy++ )
301 matrix.push_back( std::vector<bool>() ) ;
302 unsigned int bits = row_data[dy] ;
303 unsigned int mask = 256U ;
304 for(
int dx = 0 ; dx < 8 ; dx++ )
307 matrix.back().push_back( (bits & mask) != 0U ) ;
313 bool Gr::Glyph::point(
char c ,
unsigned int x ,
unsigned int y )
315 unsigned int bits = row(c)[y] ;
316 unsigned int mask = 256U >> x ;
317 return ( bits & mask ) != 0U ;
static matrix_type matrix(char c)
Returns a glyph matrix for the given character.