2018-10-30 | Paul Boddie | raw files shortlog changelog graph | Added a bitmap font, a conversion tool, and library code to blit characters. | |
data/font.S (file) data/font.txt (file) examples/vga-dual/Makefile (file) examples/vga-dual/font.S (file) examples/vga-pmp/Makefile (file) examples/vga-pmp/font.S (file) examples/vga-timer/Makefile (file) examples/vga-timer/font.S (file) examples/vga/Makefile (file) examples/vga/font.S (file) examples/vga/main.c (file) include/font.h (file) lib/font.c (file) mk/common.mk (file) tools/makefont.py (file) |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/data/font.S Tue Oct 30 19:21:53 2018 +0100 1.3 @@ -0,0 +1,1424 @@ 1.4 +.globl fontchars 1.5 +.globl fonttable 1.6 +.globl fontbase 1.7 +.globl fontlimit 1.8 + 1.9 +.section .flash, "a" 1.10 + 1.11 +fontbase: 1.12 +.word 33 1.13 + 1.14 +fontchars: 1.15 +/* 33 */ 1.16 +.byte 2 /* width in pixels */ 1.17 +.byte 9 /* height in pixels */ 1.18 + 1.19 +.byte 0b10 1.20 +.byte 0b10 1.21 +.byte 0b10 1.22 +.byte 0b10 1.23 +.byte 0b10 1.24 +.byte 0b00 1.25 +.byte 0b10 1.26 +.byte 0b00 1.27 +.byte 0b00 1.28 + 1.29 +/* 34 */ 1.30 +.byte 4 /* width in pixels */ 1.31 +.byte 9 /* height in pixels */ 1.32 + 1.33 +.byte 0b1010 1.34 +.byte 0b1010 1.35 +.byte 0b0000 1.36 +.byte 0b0000 1.37 +.byte 0b0000 1.38 +.byte 0b0000 1.39 +.byte 0b0000 1.40 +.byte 0b0000 1.41 +.byte 0b0000 1.42 + 1.43 +/* 35 */ 1.44 +.byte 6 /* width in pixels */ 1.45 +.byte 9 /* height in pixels */ 1.46 + 1.47 +.byte 0b010100 1.48 +.byte 0b010100 1.49 +.byte 0b111110 1.50 +.byte 0b010100 1.51 +.byte 0b111110 1.52 +.byte 0b010100 1.53 +.byte 0b010100 1.54 +.byte 0b000000 1.55 +.byte 0b000000 1.56 + 1.57 +/* 36 */ 1.58 +.byte 6 /* width in pixels */ 1.59 +.byte 9 /* height in pixels */ 1.60 + 1.61 +.byte 0b001000 1.62 +.byte 0b011110 1.63 +.byte 0b101000 1.64 +.byte 0b011100 1.65 +.byte 0b001010 1.66 +.byte 0b111100 1.67 +.byte 0b001000 1.68 +.byte 0b000000 1.69 +.byte 0b000000 1.70 + 1.71 +/* 37 */ 1.72 +.byte 7 /* width in pixels */ 1.73 +.byte 9 /* height in pixels */ 1.74 + 1.75 +.byte 0b0100000 1.76 +.byte 0b1010010 1.77 +.byte 0b0100100 1.78 +.byte 0b0001000 1.79 +.byte 0b0010000 1.80 +.byte 0b0100100 1.81 +.byte 0b1001010 1.82 +.byte 0b0000100 1.83 +.byte 0b0000000 1.84 + 1.85 +/* 38 */ 1.86 +.byte 6 /* width in pixels */ 1.87 +.byte 9 /* height in pixels */ 1.88 + 1.89 +.byte 0b010000 1.90 +.byte 0b101000 1.91 +.byte 0b101000 1.92 +.byte 0b010000 1.93 +.byte 0b101010 1.94 +.byte 0b100100 1.95 +.byte 0b011010 1.96 +.byte 0b000000 1.97 +.byte 0b000000 1.98 + 1.99 +/* 39 */ 1.100 +.byte 2 /* width in pixels */ 1.101 +.byte 9 /* height in pixels */ 1.102 + 1.103 +.byte 0b10 1.104 +.byte 0b10 1.105 +.byte 0b00 1.106 +.byte 0b00 1.107 +.byte 0b00 1.108 +.byte 0b00 1.109 +.byte 0b00 1.110 +.byte 0b00 1.111 +.byte 0b00 1.112 + 1.113 +/* 40 */ 1.114 +.byte 4 /* width in pixels */ 1.115 +.byte 9 /* height in pixels */ 1.116 + 1.117 +.byte 0b0110 1.118 +.byte 0b1000 1.119 +.byte 0b1000 1.120 +.byte 0b1000 1.121 +.byte 0b1000 1.122 +.byte 0b1000 1.123 +.byte 0b1000 1.124 +.byte 0b0110 1.125 +.byte 0b0000 1.126 + 1.127 +/* 41 */ 1.128 +.byte 4 /* width in pixels */ 1.129 +.byte 9 /* height in pixels */ 1.130 + 1.131 +.byte 0b1100 1.132 +.byte 0b0010 1.133 +.byte 0b0010 1.134 +.byte 0b0010 1.135 +.byte 0b0010 1.136 +.byte 0b0010 1.137 +.byte 0b0010 1.138 +.byte 0b1100 1.139 +.byte 0b0000 1.140 + 1.141 +/* 42 */ 1.142 +.byte 6 /* width in pixels */ 1.143 +.byte 9 /* height in pixels */ 1.144 + 1.145 +.byte 0b001000 1.146 +.byte 0b001000 1.147 +.byte 0b101010 1.148 +.byte 0b011100 1.149 +.byte 0b101010 1.150 +.byte 0b001000 1.151 +.byte 0b001000 1.152 +.byte 0b000000 1.153 +.byte 0b000000 1.154 + 1.155 +/* 43 */ 1.156 +.byte 6 /* width in pixels */ 1.157 +.byte 9 /* height in pixels */ 1.158 + 1.159 +.byte 0b000000 1.160 +.byte 0b001000 1.161 +.byte 0b001000 1.162 +.byte 0b111110 1.163 +.byte 0b001000 1.164 +.byte 0b001000 1.165 +.byte 0b000000 1.166 +.byte 0b000000 1.167 +.byte 0b000000 1.168 + 1.169 +/* 44 */ 1.170 +.byte 3 /* width in pixels */ 1.171 +.byte 9 /* height in pixels */ 1.172 + 1.173 +.byte 0b000 1.174 +.byte 0b000 1.175 +.byte 0b000 1.176 +.byte 0b000 1.177 +.byte 0b000 1.178 +.byte 0b010 1.179 +.byte 0b010 1.180 +.byte 0b100 1.181 +.byte 0b000 1.182 + 1.183 +/* 45 */ 1.184 +.byte 5 /* width in pixels */ 1.185 +.byte 9 /* height in pixels */ 1.186 + 1.187 +.byte 0b00000 1.188 +.byte 0b00000 1.189 +.byte 0b00000 1.190 +.byte 0b11110 1.191 +.byte 0b00000 1.192 +.byte 0b00000 1.193 +.byte 0b00000 1.194 +.byte 0b00000 1.195 +.byte 0b00000 1.196 + 1.197 +/* 46 */ 1.198 +.byte 2 /* width in pixels */ 1.199 +.byte 9 /* height in pixels */ 1.200 + 1.201 +.byte 0b00 1.202 +.byte 0b00 1.203 +.byte 0b00 1.204 +.byte 0b00 1.205 +.byte 0b00 1.206 +.byte 0b00 1.207 +.byte 0b10 1.208 +.byte 0b00 1.209 +.byte 0b00 1.210 + 1.211 +/* 47 */ 1.212 +.byte 5 /* width in pixels */ 1.213 +.byte 9 /* height in pixels */ 1.214 + 1.215 +.byte 0b00010 1.216 +.byte 0b00010 1.217 +.byte 0b00100 1.218 +.byte 0b00100 1.219 +.byte 0b01000 1.220 +.byte 0b01000 1.221 +.byte 0b10000 1.222 +.byte 0b10000 1.223 +.byte 0b00000 1.224 + 1.225 +/* 48 */ 1.226 +.byte 5 /* width in pixels */ 1.227 +.byte 9 /* height in pixels */ 1.228 + 1.229 +.byte 0b01100 1.230 +.byte 0b10010 1.231 +.byte 0b10010 1.232 +.byte 0b10010 1.233 +.byte 0b10010 1.234 +.byte 0b10010 1.235 +.byte 0b01100 1.236 +.byte 0b00000 1.237 +.byte 0b00000 1.238 + 1.239 +/* 49 */ 1.240 +.byte 4 /* width in pixels */ 1.241 +.byte 9 /* height in pixels */ 1.242 + 1.243 +.byte 0b0100 1.244 +.byte 0b1100 1.245 +.byte 0b0100 1.246 +.byte 0b0100 1.247 +.byte 0b0100 1.248 +.byte 0b0100 1.249 +.byte 0b1110 1.250 +.byte 0b0000 1.251 +.byte 0b0000 1.252 + 1.253 +/* 50 */ 1.254 +.byte 5 /* width in pixels */ 1.255 +.byte 9 /* height in pixels */ 1.256 + 1.257 +.byte 0b01100 1.258 +.byte 0b10010 1.259 +.byte 0b00010 1.260 +.byte 0b00100 1.261 +.byte 0b01000 1.262 +.byte 0b10000 1.263 +.byte 0b11110 1.264 +.byte 0b00000 1.265 +.byte 0b00000 1.266 + 1.267 +/* 51 */ 1.268 +.byte 5 /* width in pixels */ 1.269 +.byte 9 /* height in pixels */ 1.270 + 1.271 +.byte 0b01100 1.272 +.byte 0b10010 1.273 +.byte 0b00010 1.274 +.byte 0b01100 1.275 +.byte 0b00010 1.276 +.byte 0b10010 1.277 +.byte 0b01100 1.278 +.byte 0b00000 1.279 +.byte 0b00000 1.280 + 1.281 +/* 52 */ 1.282 +.byte 5 /* width in pixels */ 1.283 +.byte 9 /* height in pixels */ 1.284 + 1.285 +.byte 0b00010 1.286 +.byte 0b00110 1.287 +.byte 0b01010 1.288 +.byte 0b10010 1.289 +.byte 0b11110 1.290 +.byte 0b00010 1.291 +.byte 0b00010 1.292 +.byte 0b00000 1.293 +.byte 0b00000 1.294 + 1.295 +/* 53 */ 1.296 +.byte 5 /* width in pixels */ 1.297 +.byte 9 /* height in pixels */ 1.298 + 1.299 +.byte 0b11110 1.300 +.byte 0b10000 1.301 +.byte 0b10000 1.302 +.byte 0b11100 1.303 +.byte 0b00010 1.304 +.byte 0b00010 1.305 +.byte 0b11100 1.306 +.byte 0b00000 1.307 +.byte 0b00000 1.308 + 1.309 +/* 54 */ 1.310 +.byte 5 /* width in pixels */ 1.311 +.byte 9 /* height in pixels */ 1.312 + 1.313 +.byte 0b01100 1.314 +.byte 0b10010 1.315 +.byte 0b10000 1.316 +.byte 0b11100 1.317 +.byte 0b10010 1.318 +.byte 0b10010 1.319 +.byte 0b01100 1.320 +.byte 0b00000 1.321 +.byte 0b00000 1.322 + 1.323 +/* 55 */ 1.324 +.byte 4 /* width in pixels */ 1.325 +.byte 9 /* height in pixels */ 1.326 + 1.327 +.byte 0b1110 1.328 +.byte 0b0010 1.329 +.byte 0b0010 1.330 +.byte 0b0100 1.331 +.byte 0b0100 1.332 +.byte 0b1000 1.333 +.byte 0b1000 1.334 +.byte 0b0000 1.335 +.byte 0b0000 1.336 + 1.337 +/* 56 */ 1.338 +.byte 5 /* width in pixels */ 1.339 +.byte 9 /* height in pixels */ 1.340 + 1.341 +.byte 0b01100 1.342 +.byte 0b10010 1.343 +.byte 0b10010 1.344 +.byte 0b01100 1.345 +.byte 0b10010 1.346 +.byte 0b10010 1.347 +.byte 0b01100 1.348 +.byte 0b00000 1.349 +.byte 0b00000 1.350 + 1.351 +/* 57 */ 1.352 +.byte 5 /* width in pixels */ 1.353 +.byte 9 /* height in pixels */ 1.354 + 1.355 +.byte 0b01100 1.356 +.byte 0b10010 1.357 +.byte 0b10010 1.358 +.byte 0b01110 1.359 +.byte 0b00010 1.360 +.byte 0b10010 1.361 +.byte 0b01100 1.362 +.byte 0b00000 1.363 +.byte 0b00000 1.364 + 1.365 +/* 58 */ 1.366 +.byte 2 /* width in pixels */ 1.367 +.byte 9 /* height in pixels */ 1.368 + 1.369 +.byte 0b00 1.370 +.byte 0b00 1.371 +.byte 0b00 1.372 +.byte 0b10 1.373 +.byte 0b00 1.374 +.byte 0b10 1.375 +.byte 0b00 1.376 +.byte 0b00 1.377 +.byte 0b00 1.378 + 1.379 +/* 59 */ 1.380 +.byte 3 /* width in pixels */ 1.381 +.byte 9 /* height in pixels */ 1.382 + 1.383 +.byte 0b000 1.384 +.byte 0b000 1.385 +.byte 0b000 1.386 +.byte 0b010 1.387 +.byte 0b000 1.388 +.byte 0b010 1.389 +.byte 0b010 1.390 +.byte 0b100 1.391 +.byte 0b000 1.392 + 1.393 +/* 60 */ 1.394 +.byte 4 /* width in pixels */ 1.395 +.byte 9 /* height in pixels */ 1.396 + 1.397 +.byte 0b0000 1.398 +.byte 0b0010 1.399 +.byte 0b0100 1.400 +.byte 0b1000 1.401 +.byte 0b0100 1.402 +.byte 0b0010 1.403 +.byte 0b0000 1.404 +.byte 0b0000 1.405 +.byte 0b0000 1.406 + 1.407 +/* 61 */ 1.408 +.byte 4 /* width in pixels */ 1.409 +.byte 9 /* height in pixels */ 1.410 + 1.411 +.byte 0b0000 1.412 +.byte 0b0000 1.413 +.byte 0b1110 1.414 +.byte 0b0000 1.415 +.byte 0b1110 1.416 +.byte 0b0000 1.417 +.byte 0b0000 1.418 +.byte 0b0000 1.419 +.byte 0b0000 1.420 + 1.421 +/* 62 */ 1.422 +.byte 4 /* width in pixels */ 1.423 +.byte 9 /* height in pixels */ 1.424 + 1.425 +.byte 0b0000 1.426 +.byte 0b1000 1.427 +.byte 0b0100 1.428 +.byte 0b0010 1.429 +.byte 0b0100 1.430 +.byte 0b1000 1.431 +.byte 0b0000 1.432 +.byte 0b0000 1.433 +.byte 0b0000 1.434 + 1.435 +/* 63 */ 1.436 +.byte 5 /* width in pixels */ 1.437 +.byte 9 /* height in pixels */ 1.438 + 1.439 +.byte 0b01100 1.440 +.byte 0b10010 1.441 +.byte 0b00010 1.442 +.byte 0b00100 1.443 +.byte 0b00100 1.444 +.byte 0b00000 1.445 +.byte 0b00100 1.446 +.byte 0b00000 1.447 +.byte 0b00000 1.448 + 1.449 +/* 64 */ 1.450 +.byte 7 /* width in pixels */ 1.451 +.byte 9 /* height in pixels */ 1.452 + 1.453 +.byte 0b0000000 1.454 +.byte 0b0011100 1.455 +.byte 0b0100010 1.456 +.byte 0b1001110 1.457 +.byte 0b1010010 1.458 +.byte 0b1001100 1.459 +.byte 0b0100000 1.460 +.byte 0b0011110 1.461 +.byte 0b0000000 1.462 + 1.463 +/* 65 */ 1.464 +.byte 5 /* width in pixels */ 1.465 +.byte 9 /* height in pixels */ 1.466 + 1.467 +.byte 0b01100 1.468 +.byte 0b10010 1.469 +.byte 0b10010 1.470 +.byte 0b11110 1.471 +.byte 0b10010 1.472 +.byte 0b10010 1.473 +.byte 0b10010 1.474 +.byte 0b00000 1.475 +.byte 0b00000 1.476 + 1.477 +/* 66 */ 1.478 +.byte 5 /* width in pixels */ 1.479 +.byte 9 /* height in pixels */ 1.480 + 1.481 +.byte 0b11100 1.482 +.byte 0b10010 1.483 +.byte 0b10010 1.484 +.byte 0b11100 1.485 +.byte 0b10010 1.486 +.byte 0b10010 1.487 +.byte 0b11100 1.488 +.byte 0b00000 1.489 +.byte 0b00000 1.490 + 1.491 +/* 67 */ 1.492 +.byte 5 /* width in pixels */ 1.493 +.byte 9 /* height in pixels */ 1.494 + 1.495 +.byte 0b01100 1.496 +.byte 0b10010 1.497 +.byte 0b10000 1.498 +.byte 0b10000 1.499 +.byte 0b10000 1.500 +.byte 0b10010 1.501 +.byte 0b01100 1.502 +.byte 0b00000 1.503 +.byte 0b00000 1.504 + 1.505 +/* 68 */ 1.506 +.byte 5 /* width in pixels */ 1.507 +.byte 9 /* height in pixels */ 1.508 + 1.509 +.byte 0b11100 1.510 +.byte 0b10010 1.511 +.byte 0b10010 1.512 +.byte 0b10010 1.513 +.byte 0b10010 1.514 +.byte 0b10010 1.515 +.byte 0b11100 1.516 +.byte 0b00000 1.517 +.byte 0b00000 1.518 + 1.519 +/* 69 */ 1.520 +.byte 4 /* width in pixels */ 1.521 +.byte 9 /* height in pixels */ 1.522 + 1.523 +.byte 0b1110 1.524 +.byte 0b1000 1.525 +.byte 0b1000 1.526 +.byte 0b1110 1.527 +.byte 0b1000 1.528 +.byte 0b1000 1.529 +.byte 0b1110 1.530 +.byte 0b0000 1.531 +.byte 0b0000 1.532 + 1.533 +/* 70 */ 1.534 +.byte 4 /* width in pixels */ 1.535 +.byte 9 /* height in pixels */ 1.536 + 1.537 +.byte 0b1110 1.538 +.byte 0b1000 1.539 +.byte 0b1000 1.540 +.byte 0b1110 1.541 +.byte 0b1000 1.542 +.byte 0b1000 1.543 +.byte 0b1000 1.544 +.byte 0b0000 1.545 +.byte 0b0000 1.546 + 1.547 +/* 71 */ 1.548 +.byte 5 /* width in pixels */ 1.549 +.byte 9 /* height in pixels */ 1.550 + 1.551 +.byte 0b01100 1.552 +.byte 0b10010 1.553 +.byte 0b10000 1.554 +.byte 0b10110 1.555 +.byte 0b10010 1.556 +.byte 0b10010 1.557 +.byte 0b01100 1.558 +.byte 0b00000 1.559 +.byte 0b00000 1.560 + 1.561 +/* 72 */ 1.562 +.byte 5 /* width in pixels */ 1.563 +.byte 9 /* height in pixels */ 1.564 + 1.565 +.byte 0b10010 1.566 +.byte 0b10010 1.567 +.byte 0b10010 1.568 +.byte 0b11110 1.569 +.byte 0b10010 1.570 +.byte 0b10010 1.571 +.byte 0b10010 1.572 +.byte 0b00000 1.573 +.byte 0b00000 1.574 + 1.575 +/* 73 */ 1.576 +.byte 4 /* width in pixels */ 1.577 +.byte 9 /* height in pixels */ 1.578 + 1.579 +.byte 0b1110 1.580 +.byte 0b0100 1.581 +.byte 0b0100 1.582 +.byte 0b0100 1.583 +.byte 0b0100 1.584 +.byte 0b0100 1.585 +.byte 0b1110 1.586 +.byte 0b0000 1.587 +.byte 0b0000 1.588 + 1.589 +/* 74 */ 1.590 +.byte 5 /* width in pixels */ 1.591 +.byte 9 /* height in pixels */ 1.592 + 1.593 +.byte 0b01110 1.594 +.byte 0b00100 1.595 +.byte 0b00100 1.596 +.byte 0b00100 1.597 +.byte 0b00100 1.598 +.byte 0b00100 1.599 +.byte 0b11000 1.600 +.byte 0b00000 1.601 +.byte 0b00000 1.602 + 1.603 +/* 75 */ 1.604 +.byte 5 /* width in pixels */ 1.605 +.byte 9 /* height in pixels */ 1.606 + 1.607 +.byte 0b10010 1.608 +.byte 0b10100 1.609 +.byte 0b11000 1.610 +.byte 0b11000 1.611 +.byte 0b10100 1.612 +.byte 0b10010 1.613 +.byte 0b10010 1.614 +.byte 0b00000 1.615 +.byte 0b00000 1.616 + 1.617 +/* 76 */ 1.618 +.byte 4 /* width in pixels */ 1.619 +.byte 9 /* height in pixels */ 1.620 + 1.621 +.byte 0b1000 1.622 +.byte 0b1000 1.623 +.byte 0b1000 1.624 +.byte 0b1000 1.625 +.byte 0b1000 1.626 +.byte 0b1000 1.627 +.byte 0b1110 1.628 +.byte 0b0000 1.629 +.byte 0b0000 1.630 + 1.631 +/* 77 */ 1.632 +.byte 6 /* width in pixels */ 1.633 +.byte 9 /* height in pixels */ 1.634 + 1.635 +.byte 0b100010 1.636 +.byte 0b110110 1.637 +.byte 0b101010 1.638 +.byte 0b100010 1.639 +.byte 0b100010 1.640 +.byte 0b100010 1.641 +.byte 0b100010 1.642 +.byte 0b000000 1.643 +.byte 0b000000 1.644 + 1.645 +/* 78 */ 1.646 +.byte 6 /* width in pixels */ 1.647 +.byte 9 /* height in pixels */ 1.648 + 1.649 +.byte 0b100010 1.650 +.byte 0b110010 1.651 +.byte 0b101010 1.652 +.byte 0b100110 1.653 +.byte 0b100010 1.654 +.byte 0b100010 1.655 +.byte 0b100010 1.656 +.byte 0b000000 1.657 +.byte 0b000000 1.658 + 1.659 +/* 79 */ 1.660 +.byte 6 /* width in pixels */ 1.661 +.byte 9 /* height in pixels */ 1.662 + 1.663 +.byte 0b011100 1.664 +.byte 0b100010 1.665 +.byte 0b100010 1.666 +.byte 0b100010 1.667 +.byte 0b100010 1.668 +.byte 0b100010 1.669 +.byte 0b011100 1.670 +.byte 0b000000 1.671 +.byte 0b000000 1.672 + 1.673 +/* 80 */ 1.674 +.byte 5 /* width in pixels */ 1.675 +.byte 9 /* height in pixels */ 1.676 + 1.677 +.byte 0b11100 1.678 +.byte 0b10010 1.679 +.byte 0b10010 1.680 +.byte 0b11100 1.681 +.byte 0b10000 1.682 +.byte 0b10000 1.683 +.byte 0b10000 1.684 +.byte 0b00000 1.685 +.byte 0b00000 1.686 + 1.687 +/* 81 */ 1.688 +.byte 6 /* width in pixels */ 1.689 +.byte 9 /* height in pixels */ 1.690 + 1.691 +.byte 0b011100 1.692 +.byte 0b100010 1.693 +.byte 0b100010 1.694 +.byte 0b100010 1.695 +.byte 0b101010 1.696 +.byte 0b100100 1.697 +.byte 0b011010 1.698 +.byte 0b000000 1.699 +.byte 0b000000 1.700 + 1.701 +/* 82 */ 1.702 +.byte 5 /* width in pixels */ 1.703 +.byte 9 /* height in pixels */ 1.704 + 1.705 +.byte 0b11100 1.706 +.byte 0b10010 1.707 +.byte 0b10010 1.708 +.byte 0b11100 1.709 +.byte 0b10010 1.710 +.byte 0b10010 1.711 +.byte 0b10010 1.712 +.byte 0b00000 1.713 +.byte 0b00000 1.714 + 1.715 +/* 83 */ 1.716 +.byte 5 /* width in pixels */ 1.717 +.byte 9 /* height in pixels */ 1.718 + 1.719 +.byte 0b01100 1.720 +.byte 0b10010 1.721 +.byte 0b10000 1.722 +.byte 0b01100 1.723 +.byte 0b00010 1.724 +.byte 0b10010 1.725 +.byte 0b01100 1.726 +.byte 0b00000 1.727 +.byte 0b00000 1.728 + 1.729 +/* 84 */ 1.730 +.byte 6 /* width in pixels */ 1.731 +.byte 9 /* height in pixels */ 1.732 + 1.733 +.byte 0b111110 1.734 +.byte 0b001000 1.735 +.byte 0b001000 1.736 +.byte 0b001000 1.737 +.byte 0b001000 1.738 +.byte 0b001000 1.739 +.byte 0b001000 1.740 +.byte 0b000000 1.741 +.byte 0b000000 1.742 + 1.743 +/* 85 */ 1.744 +.byte 5 /* width in pixels */ 1.745 +.byte 9 /* height in pixels */ 1.746 + 1.747 +.byte 0b10010 1.748 +.byte 0b10010 1.749 +.byte 0b10010 1.750 +.byte 0b10010 1.751 +.byte 0b10010 1.752 +.byte 0b10010 1.753 +.byte 0b01100 1.754 +.byte 0b00000 1.755 +.byte 0b00000 1.756 + 1.757 +/* 86 */ 1.758 +.byte 6 /* width in pixels */ 1.759 +.byte 9 /* height in pixels */ 1.760 + 1.761 +.byte 0b100010 1.762 +.byte 0b100010 1.763 +.byte 0b100010 1.764 +.byte 0b100010 1.765 +.byte 0b100010 1.766 +.byte 0b010100 1.767 +.byte 0b001000 1.768 +.byte 0b000000 1.769 +.byte 0b000000 1.770 + 1.771 +/* 87 */ 1.772 +.byte 6 /* width in pixels */ 1.773 +.byte 9 /* height in pixels */ 1.774 + 1.775 +.byte 0b100010 1.776 +.byte 0b100010 1.777 +.byte 0b100010 1.778 +.byte 0b101010 1.779 +.byte 0b101010 1.780 +.byte 0b101010 1.781 +.byte 0b010100 1.782 +.byte 0b000000 1.783 +.byte 0b000000 1.784 + 1.785 +/* 88 */ 1.786 +.byte 6 /* width in pixels */ 1.787 +.byte 9 /* height in pixels */ 1.788 + 1.789 +.byte 0b100010 1.790 +.byte 0b100010 1.791 +.byte 0b010100 1.792 +.byte 0b001000 1.793 +.byte 0b010100 1.794 +.byte 0b100010 1.795 +.byte 0b100010 1.796 +.byte 0b000000 1.797 +.byte 0b000000 1.798 + 1.799 +/* 89 */ 1.800 +.byte 6 /* width in pixels */ 1.801 +.byte 9 /* height in pixels */ 1.802 + 1.803 +.byte 0b100010 1.804 +.byte 0b100010 1.805 +.byte 0b100010 1.806 +.byte 0b010100 1.807 +.byte 0b001000 1.808 +.byte 0b001000 1.809 +.byte 0b001000 1.810 +.byte 0b000000 1.811 +.byte 0b000000 1.812 + 1.813 +/* 90 */ 1.814 +.byte 5 /* width in pixels */ 1.815 +.byte 9 /* height in pixels */ 1.816 + 1.817 +.byte 0b11110 1.818 +.byte 0b00010 1.819 +.byte 0b00100 1.820 +.byte 0b01000 1.821 +.byte 0b10000 1.822 +.byte 0b10000 1.823 +.byte 0b11110 1.824 +.byte 0b00000 1.825 +.byte 0b00000 1.826 + 1.827 +/* 91 */ 1.828 +.byte 4 /* width in pixels */ 1.829 +.byte 9 /* height in pixels */ 1.830 + 1.831 +.byte 0b1110 1.832 +.byte 0b1000 1.833 +.byte 0b1000 1.834 +.byte 0b1000 1.835 +.byte 0b1000 1.836 +.byte 0b1000 1.837 +.byte 0b1000 1.838 +.byte 0b1110 1.839 +.byte 0b0000 1.840 + 1.841 +/* 92 */ 1.842 +.byte 5 /* width in pixels */ 1.843 +.byte 9 /* height in pixels */ 1.844 + 1.845 +.byte 0b10000 1.846 +.byte 0b10000 1.847 +.byte 0b01000 1.848 +.byte 0b01000 1.849 +.byte 0b00100 1.850 +.byte 0b00100 1.851 +.byte 0b00010 1.852 +.byte 0b00010 1.853 +.byte 0b00000 1.854 + 1.855 +/* 93 */ 1.856 +.byte 4 /* width in pixels */ 1.857 +.byte 9 /* height in pixels */ 1.858 + 1.859 +.byte 0b1110 1.860 +.byte 0b0010 1.861 +.byte 0b0010 1.862 +.byte 0b0010 1.863 +.byte 0b0010 1.864 +.byte 0b0010 1.865 +.byte 0b0010 1.866 +.byte 0b1110 1.867 +.byte 0b0000 1.868 + 1.869 +/* 94 */ 1.870 +.byte 6 /* width in pixels */ 1.871 +.byte 9 /* height in pixels */ 1.872 + 1.873 +.byte 0b001000 1.874 +.byte 0b010100 1.875 +.byte 0b100010 1.876 +.byte 0b000000 1.877 +.byte 0b000000 1.878 +.byte 0b000000 1.879 +.byte 0b000000 1.880 +.byte 0b000000 1.881 +.byte 0b000000 1.882 + 1.883 +/* 95 */ 1.884 +.byte 5 /* width in pixels */ 1.885 +.byte 9 /* height in pixels */ 1.886 + 1.887 +.byte 0b00000 1.888 +.byte 0b00000 1.889 +.byte 0b00000 1.890 +.byte 0b00000 1.891 +.byte 0b00000 1.892 +.byte 0b00000 1.893 +.byte 0b00000 1.894 +.byte 0b11110 1.895 +.byte 0b00000 1.896 + 1.897 +/* 96 */ 1.898 +.byte 3 /* width in pixels */ 1.899 +.byte 9 /* height in pixels */ 1.900 + 1.901 +.byte 0b100 1.902 +.byte 0b010 1.903 +.byte 0b000 1.904 +.byte 0b000 1.905 +.byte 0b000 1.906 +.byte 0b000 1.907 +.byte 0b000 1.908 +.byte 0b000 1.909 +.byte 0b000 1.910 + 1.911 +/* 97 */ 1.912 +.byte 5 /* width in pixels */ 1.913 +.byte 9 /* height in pixels */ 1.914 + 1.915 +.byte 0b00000 1.916 +.byte 0b00000 1.917 +.byte 0b01100 1.918 +.byte 0b00010 1.919 +.byte 0b01110 1.920 +.byte 0b10010 1.921 +.byte 0b01110 1.922 +.byte 0b00000 1.923 +.byte 0b00000 1.924 + 1.925 +/* 98 */ 1.926 +.byte 5 /* width in pixels */ 1.927 +.byte 9 /* height in pixels */ 1.928 + 1.929 +.byte 0b10000 1.930 +.byte 0b10000 1.931 +.byte 0b11100 1.932 +.byte 0b10010 1.933 +.byte 0b10010 1.934 +.byte 0b10010 1.935 +.byte 0b11100 1.936 +.byte 0b00000 1.937 +.byte 0b00000 1.938 + 1.939 +/* 99 */ 1.940 +.byte 5 /* width in pixels */ 1.941 +.byte 9 /* height in pixels */ 1.942 + 1.943 +.byte 0b00000 1.944 +.byte 0b00000 1.945 +.byte 0b01110 1.946 +.byte 0b10000 1.947 +.byte 0b10000 1.948 +.byte 0b10000 1.949 +.byte 0b01110 1.950 +.byte 0b00000 1.951 +.byte 0b00000 1.952 + 1.953 +/* 100 */ 1.954 +.byte 5 /* width in pixels */ 1.955 +.byte 9 /* height in pixels */ 1.956 + 1.957 +.byte 0b00010 1.958 +.byte 0b00010 1.959 +.byte 0b01110 1.960 +.byte 0b10010 1.961 +.byte 0b10010 1.962 +.byte 0b10010 1.963 +.byte 0b01110 1.964 +.byte 0b00000 1.965 +.byte 0b00000 1.966 + 1.967 +/* 101 */ 1.968 +.byte 5 /* width in pixels */ 1.969 +.byte 9 /* height in pixels */ 1.970 + 1.971 +.byte 0b00000 1.972 +.byte 0b00000 1.973 +.byte 0b01100 1.974 +.byte 0b10010 1.975 +.byte 0b11110 1.976 +.byte 0b10000 1.977 +.byte 0b01110 1.978 +.byte 0b00000 1.979 +.byte 0b00000 1.980 + 1.981 +/* 102 */ 1.982 +.byte 5 /* width in pixels */ 1.983 +.byte 9 /* height in pixels */ 1.984 + 1.985 +.byte 0b00110 1.986 +.byte 0b01000 1.987 +.byte 0b11110 1.988 +.byte 0b01000 1.989 +.byte 0b01000 1.990 +.byte 0b01000 1.991 +.byte 0b01000 1.992 +.byte 0b00000 1.993 +.byte 0b00000 1.994 + 1.995 +/* 103 */ 1.996 +.byte 5 /* width in pixels */ 1.997 +.byte 9 /* height in pixels */ 1.998 + 1.999 +.byte 0b00000 1.1000 +.byte 0b00000 1.1001 +.byte 0b01110 1.1002 +.byte 0b10010 1.1003 +.byte 0b10010 1.1004 +.byte 0b01110 1.1005 +.byte 0b00010 1.1006 +.byte 0b11100 1.1007 +.byte 0b00000 1.1008 + 1.1009 +/* 104 */ 1.1010 +.byte 5 /* width in pixels */ 1.1011 +.byte 9 /* height in pixels */ 1.1012 + 1.1013 +.byte 0b10000 1.1014 +.byte 0b10000 1.1015 +.byte 0b11100 1.1016 +.byte 0b10010 1.1017 +.byte 0b10010 1.1018 +.byte 0b10010 1.1019 +.byte 0b10010 1.1020 +.byte 0b00000 1.1021 +.byte 0b00000 1.1022 + 1.1023 +/* 105 */ 1.1024 +.byte 2 /* width in pixels */ 1.1025 +.byte 9 /* height in pixels */ 1.1026 + 1.1027 +.byte 0b10 1.1028 +.byte 0b00 1.1029 +.byte 0b10 1.1030 +.byte 0b10 1.1031 +.byte 0b10 1.1032 +.byte 0b10 1.1033 +.byte 0b10 1.1034 +.byte 0b00 1.1035 +.byte 0b00 1.1036 + 1.1037 +/* 106 */ 1.1038 +.byte 4 /* width in pixels */ 1.1039 +.byte 9 /* height in pixels */ 1.1040 + 1.1041 +.byte 0b0010 1.1042 +.byte 0b0000 1.1043 +.byte 0b0010 1.1044 +.byte 0b0010 1.1045 +.byte 0b0010 1.1046 +.byte 0b0010 1.1047 +.byte 0b0010 1.1048 +.byte 0b1100 1.1049 +.byte 0b0000 1.1050 + 1.1051 +/* 107 */ 1.1052 +.byte 5 /* width in pixels */ 1.1053 +.byte 9 /* height in pixels */ 1.1054 + 1.1055 +.byte 0b10000 1.1056 +.byte 0b10000 1.1057 +.byte 0b10010 1.1058 +.byte 0b10100 1.1059 +.byte 0b11000 1.1060 +.byte 0b10100 1.1061 +.byte 0b10010 1.1062 +.byte 0b00000 1.1063 +.byte 0b00000 1.1064 + 1.1065 +/* 108 */ 1.1066 +.byte 3 /* width in pixels */ 1.1067 +.byte 9 /* height in pixels */ 1.1068 + 1.1069 +.byte 0b100 1.1070 +.byte 0b100 1.1071 +.byte 0b100 1.1072 +.byte 0b100 1.1073 +.byte 0b100 1.1074 +.byte 0b100 1.1075 +.byte 0b010 1.1076 +.byte 0b000 1.1077 +.byte 0b000 1.1078 + 1.1079 +/* 109 */ 1.1080 +.byte 8 /* width in pixels */ 1.1081 +.byte 9 /* height in pixels */ 1.1082 + 1.1083 +.byte 0b00000000 1.1084 +.byte 0b00000000 1.1085 +.byte 0b01101100 1.1086 +.byte 0b10010010 1.1087 +.byte 0b10010010 1.1088 +.byte 0b10010010 1.1089 +.byte 0b10010010 1.1090 +.byte 0b00000000 1.1091 +.byte 0b00000000 1.1092 + 1.1093 +/* 110 */ 1.1094 +.byte 5 /* width in pixels */ 1.1095 +.byte 9 /* height in pixels */ 1.1096 + 1.1097 +.byte 0b00000 1.1098 +.byte 0b00000 1.1099 +.byte 0b11100 1.1100 +.byte 0b10010 1.1101 +.byte 0b10010 1.1102 +.byte 0b10010 1.1103 +.byte 0b10010 1.1104 +.byte 0b00000 1.1105 +.byte 0b00000 1.1106 + 1.1107 +/* 111 */ 1.1108 +.byte 5 /* width in pixels */ 1.1109 +.byte 9 /* height in pixels */ 1.1110 + 1.1111 +.byte 0b00000 1.1112 +.byte 0b00000 1.1113 +.byte 0b01100 1.1114 +.byte 0b10010 1.1115 +.byte 0b10010 1.1116 +.byte 0b10010 1.1117 +.byte 0b01100 1.1118 +.byte 0b00000 1.1119 +.byte 0b00000 1.1120 + 1.1121 +/* 112 */ 1.1122 +.byte 5 /* width in pixels */ 1.1123 +.byte 9 /* height in pixels */ 1.1124 + 1.1125 +.byte 0b00000 1.1126 +.byte 0b00000 1.1127 +.byte 0b11100 1.1128 +.byte 0b10010 1.1129 +.byte 0b10010 1.1130 +.byte 0b11100 1.1131 +.byte 0b10000 1.1132 +.byte 0b10000 1.1133 +.byte 0b00000 1.1134 + 1.1135 +/* 113 */ 1.1136 +.byte 5 /* width in pixels */ 1.1137 +.byte 9 /* height in pixels */ 1.1138 + 1.1139 +.byte 0b00000 1.1140 +.byte 0b00000 1.1141 +.byte 0b01110 1.1142 +.byte 0b10010 1.1143 +.byte 0b10010 1.1144 +.byte 0b01110 1.1145 +.byte 0b00010 1.1146 +.byte 0b00010 1.1147 +.byte 0b00000 1.1148 + 1.1149 +/* 114 */ 1.1150 +.byte 5 /* width in pixels */ 1.1151 +.byte 9 /* height in pixels */ 1.1152 + 1.1153 +.byte 0b00000 1.1154 +.byte 0b00000 1.1155 +.byte 0b10110 1.1156 +.byte 0b11000 1.1157 +.byte 0b10000 1.1158 +.byte 0b10000 1.1159 +.byte 0b10000 1.1160 +.byte 0b00000 1.1161 +.byte 0b00000 1.1162 + 1.1163 +/* 115 */ 1.1164 +.byte 5 /* width in pixels */ 1.1165 +.byte 9 /* height in pixels */ 1.1166 + 1.1167 +.byte 0b00000 1.1168 +.byte 0b00000 1.1169 +.byte 0b01110 1.1170 +.byte 0b10000 1.1171 +.byte 0b01100 1.1172 +.byte 0b00010 1.1173 +.byte 0b11100 1.1174 +.byte 0b00000 1.1175 +.byte 0b00000 1.1176 + 1.1177 +/* 116 */ 1.1178 +.byte 5 /* width in pixels */ 1.1179 +.byte 9 /* height in pixels */ 1.1180 + 1.1181 +.byte 0b01000 1.1182 +.byte 0b01000 1.1183 +.byte 0b11110 1.1184 +.byte 0b01000 1.1185 +.byte 0b01000 1.1186 +.byte 0b01000 1.1187 +.byte 0b00110 1.1188 +.byte 0b00000 1.1189 +.byte 0b00000 1.1190 + 1.1191 +/* 117 */ 1.1192 +.byte 5 /* width in pixels */ 1.1193 +.byte 9 /* height in pixels */ 1.1194 + 1.1195 +.byte 0b00000 1.1196 +.byte 0b00000 1.1197 +.byte 0b10010 1.1198 +.byte 0b10010 1.1199 +.byte 0b10010 1.1200 +.byte 0b10010 1.1201 +.byte 0b01100 1.1202 +.byte 0b00000 1.1203 +.byte 0b00000 1.1204 + 1.1205 +/* 118 */ 1.1206 +.byte 6 /* width in pixels */ 1.1207 +.byte 9 /* height in pixels */ 1.1208 + 1.1209 +.byte 0b000000 1.1210 +.byte 0b000000 1.1211 +.byte 0b100010 1.1212 +.byte 0b100010 1.1213 +.byte 0b100010 1.1214 +.byte 0b010100 1.1215 +.byte 0b001000 1.1216 +.byte 0b000000 1.1217 +.byte 0b000000 1.1218 + 1.1219 +/* 119 */ 1.1220 +.byte 8 /* width in pixels */ 1.1221 +.byte 9 /* height in pixels */ 1.1222 + 1.1223 +.byte 0b00000000 1.1224 +.byte 0b00000000 1.1225 +.byte 0b10010010 1.1226 +.byte 0b10010010 1.1227 +.byte 0b10010010 1.1228 +.byte 0b10010010 1.1229 +.byte 0b01101100 1.1230 +.byte 0b00000000 1.1231 +.byte 0b00000000 1.1232 + 1.1233 +/* 120 */ 1.1234 +.byte 6 /* width in pixels */ 1.1235 +.byte 9 /* height in pixels */ 1.1236 + 1.1237 +.byte 0b000000 1.1238 +.byte 0b000000 1.1239 +.byte 0b100010 1.1240 +.byte 0b010100 1.1241 +.byte 0b001000 1.1242 +.byte 0b010100 1.1243 +.byte 0b100010 1.1244 +.byte 0b000000 1.1245 +.byte 0b000000 1.1246 + 1.1247 +/* 121 */ 1.1248 +.byte 5 /* width in pixels */ 1.1249 +.byte 9 /* height in pixels */ 1.1250 + 1.1251 +.byte 0b00000 1.1252 +.byte 0b00000 1.1253 +.byte 0b10010 1.1254 +.byte 0b10010 1.1255 +.byte 0b10010 1.1256 +.byte 0b01110 1.1257 +.byte 0b00010 1.1258 +.byte 0b11100 1.1259 +.byte 0b00000 1.1260 + 1.1261 +/* 122 */ 1.1262 +.byte 5 /* width in pixels */ 1.1263 +.byte 9 /* height in pixels */ 1.1264 + 1.1265 +.byte 0b00000 1.1266 +.byte 0b00000 1.1267 +.byte 0b11110 1.1268 +.byte 0b00100 1.1269 +.byte 0b01000 1.1270 +.byte 0b10000 1.1271 +.byte 0b11110 1.1272 +.byte 0b00000 1.1273 +.byte 0b00000 1.1274 + 1.1275 +/* 123 */ 1.1276 +.byte 5 /* width in pixels */ 1.1277 +.byte 9 /* height in pixels */ 1.1278 + 1.1279 +.byte 0b00110 1.1280 +.byte 0b01000 1.1281 +.byte 0b01000 1.1282 +.byte 0b11000 1.1283 +.byte 0b11000 1.1284 +.byte 0b01000 1.1285 +.byte 0b01000 1.1286 +.byte 0b00110 1.1287 +.byte 0b00000 1.1288 + 1.1289 +/* 124 */ 1.1290 +.byte 3 /* width in pixels */ 1.1291 +.byte 9 /* height in pixels */ 1.1292 + 1.1293 +.byte 0b010 1.1294 +.byte 0b010 1.1295 +.byte 0b010 1.1296 +.byte 0b010 1.1297 +.byte 0b010 1.1298 +.byte 0b010 1.1299 +.byte 0b010 1.1300 +.byte 0b010 1.1301 +.byte 0b000 1.1302 + 1.1303 +/* 125 */ 1.1304 +.byte 5 /* width in pixels */ 1.1305 +.byte 9 /* height in pixels */ 1.1306 + 1.1307 +.byte 0b11000 1.1308 +.byte 0b00100 1.1309 +.byte 0b00100 1.1310 +.byte 0b00110 1.1311 +.byte 0b00110 1.1312 +.byte 0b00100 1.1313 +.byte 0b00100 1.1314 +.byte 0b11000 1.1315 +.byte 0b00000 1.1316 + 1.1317 +/* 126 */ 1.1318 +.byte 6 /* width in pixels */ 1.1319 +.byte 9 /* height in pixels */ 1.1320 + 1.1321 +.byte 0b010000 1.1322 +.byte 0b101010 1.1323 +.byte 0b000100 1.1324 +.byte 0b000000 1.1325 +.byte 0b000000 1.1326 +.byte 0b000000 1.1327 +.byte 0b000000 1.1328 +.byte 0b000000 1.1329 +.byte 0b000000 1.1330 + 1.1331 +fontlimit: 1.1332 +.word 127 1.1333 +fonttable: 1.1334 +.word 0 1.1335 +.word 11 1.1336 +.word 22 1.1337 +.word 33 1.1338 +.word 44 1.1339 +.word 55 1.1340 +.word 66 1.1341 +.word 77 1.1342 +.word 88 1.1343 +.word 99 1.1344 +.word 110 1.1345 +.word 121 1.1346 +.word 132 1.1347 +.word 143 1.1348 +.word 154 1.1349 +.word 165 1.1350 +.word 176 1.1351 +.word 187 1.1352 +.word 198 1.1353 +.word 209 1.1354 +.word 220 1.1355 +.word 231 1.1356 +.word 242 1.1357 +.word 253 1.1358 +.word 264 1.1359 +.word 275 1.1360 +.word 286 1.1361 +.word 297 1.1362 +.word 308 1.1363 +.word 319 1.1364 +.word 330 1.1365 +.word 341 1.1366 +.word 352 1.1367 +.word 363 1.1368 +.word 374 1.1369 +.word 385 1.1370 +.word 396 1.1371 +.word 407 1.1372 +.word 418 1.1373 +.word 429 1.1374 +.word 440 1.1375 +.word 451 1.1376 +.word 462 1.1377 +.word 473 1.1378 +.word 484 1.1379 +.word 495 1.1380 +.word 506 1.1381 +.word 517 1.1382 +.word 528 1.1383 +.word 539 1.1384 +.word 550 1.1385 +.word 561 1.1386 +.word 572 1.1387 +.word 583 1.1388 +.word 594 1.1389 +.word 605 1.1390 +.word 616 1.1391 +.word 627 1.1392 +.word 638 1.1393 +.word 649 1.1394 +.word 660 1.1395 +.word 671 1.1396 +.word 682 1.1397 +.word 693 1.1398 +.word 704 1.1399 +.word 715 1.1400 +.word 726 1.1401 +.word 737 1.1402 +.word 748 1.1403 +.word 759 1.1404 +.word 770 1.1405 +.word 781 1.1406 +.word 792 1.1407 +.word 803 1.1408 +.word 814 1.1409 +.word 825 1.1410 +.word 836 1.1411 +.word 847 1.1412 +.word 858 1.1413 +.word 869 1.1414 +.word 880 1.1415 +.word 891 1.1416 +.word 902 1.1417 +.word 913 1.1418 +.word 924 1.1419 +.word 935 1.1420 +.word 946 1.1421 +.word 957 1.1422 +.word 968 1.1423 +.word 979 1.1424 +.word 990 1.1425 +.word 1001 1.1426 +.word 1012 1.1427 +.word 1023
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/data/font.txt Tue Oct 30 19:21:53 2018 +0100 2.3 @@ -0,0 +1,59 @@ 2.4 +#- #-#- -#-#-- --#--- -#----- -#---- #- -##- ##-- --#--- ------ --- ----- -- ---#- 2.5 +#- #-#- -#-#-- -####- #-#--#- #-#--- #- #--- --#- --#--- --#--- --- ----- -- ---#- 2.6 +#- ---- #####- #-#--- -#--#-- #-#--- -- #--- --#- #-#-#- --#--- --- ----- -- --#-- 2.7 +#- ---- -#-#-- -###-- ---#--- -#---- -- #--- --#- -###-- #####- --- ####- -- --#-- 2.8 +#- ---- #####- --#-#- --#---- #-#-#- -- #--- --#- #-#-#- --#--- --- ----- -- -#--- 2.9 +-- ---- -#-#-- ####-- -#--#-- #--#-- -- #--- --#- --#--- --#--- -#- ----- -- -#--- 2.10 +#- ---- -#-#-- --#--- #--#-#- -##-#- -- #--- --#- --#--- ------ -#- ----- #- #---- 2.11 +-- ---- ------ ------ ----#-- ------ -- -##- ##-- ------ ------ #-- ----- -- #---- 2.12 +-- ---- ------ ------ ------- ------ -- ---- ---- ------ ------ --- ----- -- ----- 2.13 + 2.14 +-##-- -#-- -##-- -##-- ---#- ####- -##-- ###- -##-- -##-- -- --- ---- ---- ---- -##-- ------- 2.15 +#--#- ##-- #--#- #--#- --##- #---- #--#- --#- #--#- #--#- -- --- --#- ---- #--- #--#- --###-- 2.16 +#--#- -#-- ---#- ---#- -#-#- #---- #---- --#- #--#- #--#- -- --- -#-- ###- -#-- ---#- -#---#- 2.17 +#--#- -#-- --#-- -##-- #--#- ###-- ###-- -#-- -##-- -###- #- -#- #--- ---- --#- --#-- #--###- 2.18 +#--#- -#-- -#--- ---#- ####- ---#- #--#- -#-- #--#- ---#- -- --- -#-- ###- -#-- --#-- #-#--#- 2.19 +#--#- -#-- #---- #--#- ---#- ---#- #--#- #--- #--#- #--#- #- -#- --#- ---- #--- ----- #--##-- 2.20 +-##-- ###- ####- -##-- ---#- ###-- -##-- #--- -##-- -##-- -- -#- ---- ---- ---- --#-- -#----- 2.21 +----- ---- ----- ----- ----- ----- ----- ---- ----- ----- -- #-- ---- ---- ---- ----- --####- 2.22 +----- ---- ----- ----- ----- ----- ----- ---- ----- ----- -- --- ---- ---- ---- ----- ------- 2.23 + 2.24 +-##-- ###-- -##-- ###-- ###- ###- -##-- #--#- ###- -###- #--#- #--- #---#- #---#- -###-- ###-- -###-- ###-- -##-- #####- #--#- #---#- #---#- #---#- #---#- 2.25 +#--#- #--#- #--#- #--#- #--- #--- #--#- #--#- -#-- --#-- #-#-- #--- ##-##- ##--#- #---#- #--#- #---#- #--#- #--#- --#--- #--#- #---#- #---#- #---#- #---#- 2.26 +#--#- #--#- #---- #--#- #--- #--- #---- #--#- -#-- --#-- ##--- #--- #-#-#- #-#-#- #---#- #--#- #---#- #--#- #---- --#--- #--#- #---#- #---#- -#-#-- #---#- 2.27 +####- ###-- #---- #--#- ###- ###- #-##- ####- -#-- --#-- ##--- #--- #---#- #--##- #---#- ###-- #---#- ###-- -##-- --#--- #--#- #---#- #-#-#- --#--- -#-#-- 2.28 +#--#- #--#- #---- #--#- #--- #--- #--#- #--#- -#-- --#-- #-#-- #--- #---#- #---#- #---#- #---- #-#-#- #--#- ---#- --#--- #--#- #---#- #-#-#- -#-#-- --#--- 2.29 +#--#- #--#- #--#- #--#- #--- #--- #--#- #--#- -#-- --#-- #--#- #--- #---#- #---#- #---#- #---- #--#-- #--#- #--#- --#--- #--#- -#-#-- #-#-#- #---#- --#--- 2.30 +#--#- ###-- -##-- ###-- ###- #--- -##-- #--#- ###- ##--- #--#- ###- #---#- #---#- -###-- #---- -##-#- #--#- -##-- --#--- -##-- --#--- -#-#-- #---#- --#--- 2.31 +----- ----- ----- ----- ---- ---- ----- ----- ---- ----- ----- ---- ------ ------ ------ ----- ------ ----- ----- ------ ----- ------ ------ ------ ------ 2.32 +----- ----- ----- ----- ---- ---- ----- ----- ---- ----- ----- ---- ------ ------ ------ ----- ------ ----- ----- ------ ----- ------ ------ ------ ------ 2.33 + 2.34 +####- ###- #---- ###- --#--- ----- #-- 2.35 +---#- #--- #---- --#- -#-#-- ----- -#- 2.36 +--#-- #--- -#--- --#- #---#- ----- --- 2.37 +-#--- #--- -#--- --#- ------ ----- --- 2.38 +#---- #--- --#-- --#- ------ ----- --- 2.39 +#---- #--- --#-- --#- ------ ----- --- 2.40 +####- #--- ---#- --#- ------ ----- --- 2.41 +----- ###- ---#- ###- ------ ####- --- 2.42 +----- ---- ----- ---- ------ ----- --- 2.43 + 2.44 +----- #---- ----- ---#- ----- --##- ----- #---- #- --#- #---- #-- -------- ----- ----- ----- ----- ----- ----- -#--- ----- ------ -------- ------ ----- ----- 2.45 +----- #---- ----- ---#- ----- -#--- ----- #---- -- ---- #---- #-- -------- ----- ----- ----- ----- ----- ----- -#--- ----- ------ -------- ------ ----- ----- 2.46 +-##-- ###-- -###- -###- -##-- ####- -###- ###-- #- --#- #--#- #-- -##-##-- ###-- -##-- ###-- -###- #-##- -###- ####- #--#- #---#- #--#--#- #---#- #--#- ####- 2.47 +---#- #--#- #---- #--#- #--#- -#--- #--#- #--#- #- --#- #-#-- #-- #--#--#- #--#- #--#- #--#- #--#- ##--- #---- -#--- #--#- #---#- #--#--#- -#-#-- #--#- --#-- 2.48 +-###- #--#- #---- #--#- ####- -#--- #--#- #--#- #- --#- ##--- #-- #--#--#- #--#- #--#- #--#- #--#- #---- -##-- -#--- #--#- #---#- #--#--#- --#--- #--#- -#--- 2.49 +#--#- #--#- #---- #--#- #---- -#--- -###- #--#- #- --#- #-#-- #-- #--#--#- #--#- #--#- ###-- -###- #---- ---#- -#--- #--#- -#-#-- #--#--#- -#-#-- -###- #---- 2.50 +-###- ###-- -###- -###- -###- -#--- ---#- #--#- #- --#- #--#- -#- #--#--#- #--#- -##-- #---- ---#- #---- ###-- --##- -##-- --#--- -##-##-- #---#- ---#- ####- 2.51 +----- ----- ----- ----- ----- ----- ###-- ----- -- ##-- ----- --- -------- ----- ----- #---- ---#- ----- ----- ----- ----- ------ -------- ------ ###-- ----- 2.52 +----- ----- ----- ----- ----- ----- ----- ----- -- ---- ----- --- -------- ----- ----- ----- ----- ----- ----- ----- ----- ------ -------- ------ ----- ----- 2.53 + 2.54 +--##- -#- ##--- -#---- 2.55 +-#--- -#- --#-- #-#-#- 2.56 +-#--- -#- --#-- ---#-- 2.57 +##--- -#- --##- ------ 2.58 +##--- -#- --##- ------ 2.59 +-#--- -#- --#-- ------ 2.60 +-#--- -#- --#-- ------ 2.61 +--##- -#- ##--- ------ 2.62 +----- --- ----- ------
3.1 --- a/examples/vga-dual/Makefile Tue Oct 30 18:22:22 2018 +0100 3.2 +++ b/examples/vga-dual/Makefile Tue Oct 30 19:21:53 2018 +0100 3.3 @@ -27,8 +27,8 @@ 3.4 3.5 # Ordering of objects is important and cannot be left to replacement rules. 3.6 3.7 -SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S 3.8 -OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o 3.9 +SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S font.S 3.10 +OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o font.o 3.11 3.12 # Application-specific adjustments. 3.13 # See: examples/vga/Makefile
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/examples/vga-dual/font.S Tue Oct 30 19:21:53 2018 +0100 4.3 @@ -0,0 +1,1 @@ 4.4 +../../data/font.S 4.5 \ No newline at end of file
5.1 --- a/examples/vga-pmp/Makefile Tue Oct 30 18:22:22 2018 +0100 5.2 +++ b/examples/vga-pmp/Makefile Tue Oct 30 19:21:53 2018 +0100 5.3 @@ -27,10 +27,11 @@ 5.4 5.5 # Ordering of objects is important and cannot be left to replacement rules. 5.6 5.7 -SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S 5.8 -OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o 5.9 +SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S font.S 5.10 +OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o font.o 5.11 5.12 # Application-specific adjustments. 5.13 +# See: examples/vga/Makefile 5.14 5.15 CFLAGS += -DPARALLEL_MODE -I../vga 5.16
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/examples/vga-pmp/font.S Tue Oct 30 19:21:53 2018 +0100 6.3 @@ -0,0 +1,1 @@ 6.4 +../../data/font.S 6.5 \ No newline at end of file
7.1 --- a/examples/vga-timer/Makefile Tue Oct 30 18:22:22 2018 +0100 7.2 +++ b/examples/vga-timer/Makefile Tue Oct 30 19:21:53 2018 +0100 7.3 @@ -27,8 +27,8 @@ 7.4 7.5 # Ordering of objects is important and cannot be left to replacement rules. 7.6 7.7 -SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S 7.8 -OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o 7.9 +SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S font.S 7.10 +OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o font.o 7.11 7.12 # Application-specific adjustments. 7.13 # See: examples/vga/Makefile
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/examples/vga-timer/font.S Tue Oct 30 19:21:53 2018 +0100 8.3 @@ -0,0 +1,1 @@ 8.4 +../../data/font.S 8.5 \ No newline at end of file
9.1 --- a/examples/vga/Makefile Tue Oct 30 18:22:22 2018 +0100 9.2 +++ b/examples/vga/Makefile Tue Oct 30 19:21:53 2018 +0100 9.3 @@ -27,8 +27,8 @@ 9.4 9.5 # Ordering of objects is important and cannot be left to replacement rules. 9.6 9.7 -SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S 9.8 -OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o 9.9 +SRC = $(START_SRC) main.c $(COMMON_SRC) $(DISPLAY_SRC) screendata.S sprite.S font.S 9.10 +OBJ = $(START_OBJ) main.o $(COMMON_OBJ) $(DISPLAY_OBJ) screendata.o sprite.o font.o 9.11 9.12 # Application-specific adjustments. 9.13
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/examples/vga/font.S Tue Oct 30 19:21:53 2018 +0100 10.3 @@ -0,0 +1,1 @@ 10.4 +../../data/font.S 10.5 \ No newline at end of file
11.1 --- a/examples/vga/main.c Tue Oct 30 18:22:22 2018 +0100 11.2 +++ b/examples/vga/main.c Tue Oct 30 19:21:53 2018 +0100 11.3 @@ -24,11 +24,12 @@ 11.4 11.5 /* Specific functionality. */ 11.6 11.7 -#include "main.h" 11.8 #include "devconfig.h" 11.9 -#include "vga.h" 11.10 #include "display.h" 11.11 #include "display_config.h" 11.12 +#include "font.h" 11.13 +#include "main.h" 11.14 +#include "vga.h" 11.15 #include "vga_display.h" 11.16 11.17 11.18 @@ -63,13 +64,19 @@ 11.19 11.20 11.21 11.22 -/* Bundled image data. */ 11.23 +/* Bundled image and font data. */ 11.24 11.25 extern uint8_t screendata[]; 11.26 extern uint32_t screendata_width, screendata_height; 11.27 extern uint8_t sprite[]; 11.28 extern uint32_t sprite_width, sprite_height; 11.29 11.30 +extern uint8_t fontchars[]; 11.31 +extern uint32_t fonttable[]; 11.32 +extern uint32_t fontbase, fontlimit; 11.33 + 11.34 +static font_config_t font_config; 11.35 + 11.36 11.37 11.38 /* Busy wait. */ 11.39 @@ -125,6 +132,30 @@ 11.40 } 11.41 } 11.42 11.43 +/* Fill the screen with characters. */ 11.44 + 11.45 +static void write_chars(void) 11.46 +{ 11.47 + int x = 0, y = 0; 11.48 + char c; 11.49 + 11.50 + font_config.chars = (char_definition_t *) fontchars; 11.51 + font_config.table = fonttable; 11.52 + font_config.base = fontbase; 11.53 + font_config.limit = fontlimit; 11.54 + 11.55 + while (y < display_config.line_count) 11.56 + for (c = (char) font_config.base; c < (char) font_config.limit; c++) 11.57 + { 11.58 + x = write_char(&display_config, &font_config, c, x, y, 0xff); 11.59 + 11.60 + if (x > display_config.line_length) 11.61 + { 11.62 + x = 0; y += 9; 11.63 + } 11.64 + } 11.65 +} 11.66 + 11.67 11.68 11.69 /* Main program. */ 11.70 @@ -174,6 +205,10 @@ 11.71 copy_display(&display_config, screendata, screendata_width, screendata_height, 11.72 (LINE_LENGTH - screendata_width) / 2, (LINE_COUNT - screendata_height) / 2, -1, 1); 11.73 11.74 + /* Write a sequence of characters. */ 11.75 + 11.76 + write_chars(); 11.77 + 11.78 /* Move a sprite around on the screen with a delay between each movement. */ 11.79 11.80 animate(1 << 24);
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/include/font.h Tue Oct 30 19:21:53 2018 +0100 12.3 @@ -0,0 +1,57 @@ 12.4 +/* 12.5 + * Common font-related functions. 12.6 + * 12.7 + * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk> 12.8 + * 12.9 + * This program is free software: you can redistribute it and/or modify 12.10 + * it under the terms of the GNU General Public License as published by 12.11 + * the Free Software Foundation, either version 3 of the License, or 12.12 + * (at your option) any later version. 12.13 + * 12.14 + * This program is distributed in the hope that it will be useful, 12.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 12.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12.17 + * GNU General Public License for more details. 12.18 + * 12.19 + * You should have received a copy of the GNU General Public License 12.20 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 12.21 + */ 12.22 + 12.23 +#ifndef __FONT_H__ 12.24 +#define __FONT_H__ 12.25 + 12.26 +#include <stdint.h> 12.27 + 12.28 + 12.29 + 12.30 +/* Character definition structure. */ 12.31 + 12.32 +typedef struct 12.33 +{ 12.34 + uint8_t width; 12.35 + uint8_t height; 12.36 + uint8_t data[]; 12.37 + 12.38 +} char_definition_t; 12.39 + 12.40 +/* Font configuration type. */ 12.41 + 12.42 +typedef struct 12.43 +{ 12.44 + char_definition_t *chars; 12.45 + uint32_t *table; 12.46 + uint32_t base; 12.47 + uint32_t limit; 12.48 + 12.49 +} font_config_t; 12.50 + 12.51 + 12.52 + 12.53 +/* Access functions. */ 12.54 + 12.55 +char_definition_t *get_char_definition(font_config_t *cfg, char c); 12.56 + 12.57 +int write_char(display_config_t *cfg, font_config_t *fcfg, char c, 12.58 + int x, int y, uint8_t colour); 12.59 + 12.60 +#endif /* __FONT_H__ */
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/lib/font.c Tue Oct 30 19:21:53 2018 +0100 13.3 @@ -0,0 +1,71 @@ 13.4 +/* 13.5 + * Common font-related functions. 13.6 + * 13.7 + * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk> 13.8 + * 13.9 + * This program is free software: you can redistribute it and/or modify 13.10 + * it under the terms of the GNU General Public License as published by 13.11 + * the Free Software Foundation, either version 3 of the License, or 13.12 + * (at your option) any later version. 13.13 + * 13.14 + * This program is distributed in the hope that it will be useful, 13.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13.17 + * GNU General Public License for more details. 13.18 + * 13.19 + * You should have received a copy of the GNU General Public License 13.20 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 13.21 + */ 13.22 + 13.23 +#include <stdlib.h> 13.24 + 13.25 +#include "display.h" 13.26 +#include "font.h" 13.27 + 13.28 + 13.29 + 13.30 +/* Return the character definition for the given character. */ 13.31 + 13.32 +char_definition_t *get_char_definition(font_config_t *fcfg, char c) 13.33 +{ 13.34 + /* Obtain the offset from the table and combine it with the character 13.35 + definitions base address. */ 13.36 + 13.37 + if ((c >= fcfg->base) && (c < fcfg->limit)) 13.38 + return (char_definition_t *) ((uint8_t *) fcfg->chars + fcfg->table[c - fcfg->base]); 13.39 + else 13.40 + return NULL; 13.41 +} 13.42 + 13.43 +/* Write a character to the screen, returning the next character position. */ 13.44 + 13.45 +int write_char(display_config_t *cfg, font_config_t *fcfg, char c, 13.46 + int x, int y, uint8_t colour) 13.47 +{ 13.48 + int sy, dx, dy; 13.49 + char_definition_t *chardef = get_char_definition(fcfg, c); 13.50 + uint8_t *imagerow = chardef->data, 13.51 + *displayline = cfg->framebuffer + y * cfg->line_length, 13.52 + bitmap, mask; 13.53 + 13.54 + /* Space is a special case. */ 13.55 + 13.56 + if (c == ' ') 13.57 + return x + 3; 13.58 + 13.59 + for (sy = 0, dy = y; (sy < chardef->height) && (dy < cfg->line_count); sy++, dy++) 13.60 + { 13.61 + bitmap = *imagerow; 13.62 + 13.63 + for (dx = x, mask = 1 << (chardef->width - 1); (mask) && (dx < cfg->line_length); dx++, mask >>= 1) 13.64 + { 13.65 + if (bitmap & mask) 13.66 + displayline[get_position(cfg, dx)] = colour; 13.67 + } 13.68 + 13.69 + imagerow += 1; 13.70 + displayline += cfg->line_length; 13.71 + } 13.72 + 13.73 + return x + chardef->width; 13.74 +}
14.1 --- a/mk/common.mk Tue Oct 30 18:22:22 2018 +0100 14.2 +++ b/mk/common.mk Tue Oct 30 19:21:53 2018 +0100 14.3 @@ -51,8 +51,8 @@ 14.4 COMMON_SRC = $(LIBDIR)/payload.c $(LIBDIR)/init.c $(LIBDIR)/debug.c $(LIBDIR)/cpu.S 14.5 COMMON_OBJ = $(LIBDIR)/payload.o $(LIBDIR)/init.o $(LIBDIR)/debug.o $(LIBDIR)/cpu.o 14.6 14.7 -DISPLAY_SRC = $(LIBDIR)/display.c $(LIBDIR)/vga_display.c 14.8 -DISPLAY_OBJ = $(LIBDIR)/display.o $(LIBDIR)/vga_display.o 14.9 +DISPLAY_SRC = $(LIBDIR)/display.c $(LIBDIR)/vga_display.c $(LIBDIR)/font.c 14.10 +DISPLAY_OBJ = $(LIBDIR)/display.o $(LIBDIR)/vga_display.o $(LIBDIR)/font.o 14.11 14.12 # Common linker script. 14.13
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/tools/makefont.py Tue Oct 30 19:21:53 2018 +0100 15.3 @@ -0,0 +1,177 @@ 15.4 +#!/usr/bin/env python 15.5 + 15.6 +""" 15.7 +Convert simple font bitmaps to GNU assembler data. 15.8 + 15.9 +Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk> 15.10 + 15.11 +This program is free software; you can redistribute it and/or modify it under 15.12 +the terms of the GNU General Public License as published by the Free Software 15.13 +Foundation; either version 3 of the License, or (at your option) any later 15.14 +version. 15.15 + 15.16 +This program is distributed in the hope that it will be useful, but WITHOUT ANY 15.17 +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 15.18 +PARTICULAR PURPOSE. See the GNU General Public License for more details. 15.19 + 15.20 +You should have received a copy of the GNU General Public License along 15.21 +with this program. If not, see <http://www.gnu.org/licenses/>. 15.22 +""" 15.23 + 15.24 +import sys 15.25 + 15.26 +class MissingRow(Exception): 15.27 + 15.28 + "Indicate a missing row in a character definition." 15.29 + 15.30 + def __init__(self, lineno): 15.31 + self.lineno = lineno 15.32 + 15.33 + def __repr__(self): 15.34 + return "MissingRow(%r)" % self.lineno 15.35 + 15.36 + 15.37 + 15.38 +def get_character_row(f, lineno=0): 15.39 + 15.40 + "Return a row of characters from 'f', employing 'lineno' for reference." 15.41 + 15.42 + line = f.readline().strip() 15.43 + rows = [] 15.44 + 15.45 + while line: 15.46 + row = line.split() 15.47 + if rows and len(row) != len(rows[-1]): 15.48 + raise MissingRow, lineno 15.49 + 15.50 + rows.append(row) 15.51 + lineno += 1 15.52 + line = f.readline().strip() 15.53 + 15.54 + chars = [] 15.55 + 15.56 + if rows: 15.57 + for i in range(0, len(rows[0])): 15.58 + char = [] 15.59 + for row in rows: 15.60 + char.append(row[i]) 15.61 + chars.append(char) 15.62 + 15.63 + return chars 15.64 + 15.65 + 15.66 + 15.67 +def convert(infile, outfile, base=33): 15.68 + 15.69 + "Convert textual data in 'infile' to assembler data in 'outfile'." 15.70 + 15.71 + f_in = open(infile) 15.72 + f_out = open(outfile, "w") 15.73 + try: 15.74 + print >>f_out, """\ 15.75 +.globl fontchars 15.76 +.globl fonttable 15.77 +.globl fontbase 15.78 +.globl fontlimit 15.79 + 15.80 +.section .flash, "a" 15.81 + 15.82 +fontbase: 15.83 +.word %d 15.84 + 15.85 +fontchars:""" % base 15.86 + 15.87 + lineno = 1 15.88 + offset = 0 15.89 + offsets = [] 15.90 + point = base 15.91 + 15.92 + # Get each row of characters. 15.93 + 15.94 + chars = get_character_row(f_in, lineno) 15.95 + 15.96 + while chars: 15.97 + lineno += len(chars[0]) + 1 15.98 + 15.99 + # Write each character definition. 15.100 + 15.101 + for point, char in enumerate(chars, point): 15.102 + offsets.append(offset) 15.103 + offset += write_character(f_out, point, char) 15.104 + 15.105 + point += 1 15.106 + 15.107 + # Get the next row. 15.108 + 15.109 + chars = get_character_row(f_in, lineno) 15.110 + 15.111 + # Write the limit of characters. 15.112 + 15.113 + print >>f_out, """\ 15.114 +fontlimit: 15.115 +.word %d""" % point 15.116 + 15.117 + # Write the offset table. 15.118 + 15.119 + print >>f_out, """\ 15.120 +fonttable:""" 15.121 + 15.122 + for offset in offsets: 15.123 + print >>f_out, ".word %d" % offset 15.124 + 15.125 + finally: 15.126 + f_in.close() 15.127 + f_out.close() 15.128 + 15.129 + 15.130 + 15.131 +def write_character(f, point, char): 15.132 + 15.133 + "Write to 'f' for the given 'point' the indicated 'char' definition." 15.134 + 15.135 + # Write a comment and pixel width information. 15.136 + 15.137 + print >>f, """\ 15.138 +/* %d */ 15.139 +.byte %d /* width in pixels */ 15.140 +.byte %d /* height in pixels */ 15.141 +""" % (point, len(char[0]), len(char)) 15.142 + 15.143 + # Write the pixel rows to a sequence of bytes. 15.144 + 15.145 + for row in char: 15.146 + print >>f, ".byte 0b%s" % row.replace("-", "0").replace("#", "1") 15.147 + 15.148 + print >>f 15.149 + 15.150 + # Return the size of the definition as the number of rows plus the width 15.151 + # and height bytes. 15.152 + 15.153 + return len(char) + 2 15.154 + 15.155 + 15.156 + 15.157 +# Main program. 15.158 + 15.159 +if __name__ == "__main__": 15.160 + 15.161 + # Obtain filenames. 15.162 + 15.163 + try: 15.164 + infile, outfile = sys.argv[1:3] 15.165 + except ValueError: 15.166 + print >>sys.stderr, """\ 15.167 +Usage: %s <input filename> <output filename> 15.168 +""" 15.169 + sys.exit(1) 15.170 + 15.171 + # Perform the conversion. 15.172 + 15.173 + try: 15.174 + convert(infile, outfile) 15.175 + except MissingRow, exc: 15.176 + print >>sys.stderr, """\ 15.177 +Missing character information at line %d in file %s. 15.178 +""" % (exc.lineno, infile) 15.179 + 15.180 +# vim: tabstop=4 expandtab shiftwidth=4