You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

55 lines
1.3 KiB

  1. # Font thing
  2. A small bitmap font renderer with its own format.
  3. ## The format
  4. Introducing *TXTF* a family of text based bitmap font formats.
  5. The first line of a *TXTF* font is the following:
  6. > `TXTF` *mode* *nbcommentlines* *params*
  7. Like
  8. ```
  9. TXTF 1 10 5 5 .#
  10. ```
  11. The *nbcommentlines* parameter is the number of description or comment
  12. lines placed before the actual font data (not including the
  13. header). In this comment area, you may put stuff like modelines,
  14. copyright information and/or a description of the font.
  15. The *mode* is the specific format in the txtf family this file is in,
  16. the existing mode are as follows
  17. ### Mode 1 (Monospace)
  18. > `TXTF` `1` nbcommentlines width height alphabet
  19. >
  20. > Comment lines
  21. >
  22. > Data
  23. - *width*: is the number of pixels each character is wide
  24. - *height*: is the number of pixels each character is high
  25. - *alphabet*: 2 characters, the first represents OFF pixels, the second
  26. represents ON pixels.
  27. Data is then in the following form
  28. > character "*width* * *height* of the alphabet for the character"
  29. whitespace is ignored in character data.
  30. Here is a sample mode 1 font
  31. ```
  32. TXTF 1 2 6 6 .#
  33. Some font for the readme
  34. By Annwan
  35. !..#.....#.....#...........#.........
  36. #.#.#..#####..#.#..#####..#.#........
  37. _..............................######
  38. ```