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.

61 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #+title: Font thing
  2. #+author: Antoine "Annwan" COMBET
  3. #+options: toc:nil
  4. A small bitmap font renderer with its own format.
  5. * The format
  6. Introducing /TXTF/ a family of text based bitmap font formats.
  7. The first line of a TXTF font is the following:
  8. #+begin_quote
  9. =TXTF= /mode/ /nbcommentlines/ /params/
  10. #+end_quote
  11. Like
  12. #+begin_example
  13. TXTF 1 10 5 5 .#
  14. #+end_example
  15. The /nbcommentlines/ parameter is the number of description or comment
  16. lines placed before the actual font data (not including the
  17. header). In this comment area, you may put stuff like modelines,
  18. copyright information and/or a description of the font.
  19. The /mode/ is the specific fomat in the txtf familly this file is in,
  20. the existing mode are as follow
  21. ** Mode 1 (Monospace)
  22. #+begin_quote
  23. =TXTF= =1= nbcommentlines width height alphabet
  24. Comment lines
  25. Data
  26. #+end_quote
  27. - /width/: is the number of pixels each character is wide
  28. - /height/: is the number of pixels each character is high
  29. - /alphabet/: 2 characters, the first represents OFF pixels, the second
  30. represents ON pixels.
  31. Data is then in the following form
  32. #+begin_quote
  33. character "/width/ * /height/ of the alphabet for the character"
  34. #+end_quote
  35. whitespace is ignored in character data.
  36. Here is a sample mode 1 font
  37. #+begin_src nil
  38. TXTF 1 2 6 6 .#
  39. Some font for the readme
  40. By Annwan
  41. !..#.....#.....#...........#.........
  42. #.#.#..#####..#.#..#####..#.#........
  43. _........................#####.......
  44. #+end_src
  45. # Local variables:
  46. # eval: (auto-fill-mode +1)
  47. # End: