diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..82195aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +venv +.idea \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..81c5183 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# Font thing + +A small bitmap font renderer with its own format. + +## The format + +Introducing *TXTF* a family of text based bitmap font formats. + +The first line of a *TXTF* font is the following: + +> `TXTF` *mode* *nbcommentlines* *params* + +Like + +``` +TXTF 1 10 5 5 .# +``` + +The *nbcommentlines* parameter is the number of description or comment +lines placed before the actual font data (not including the +header). In this comment area, you may put stuff like modelines, +copyright information and/or a description of the font. + +The *mode* is the specific format in the txtf family this file is in, +the existing mode are as follows + +### Mode 1 (Monospace) + +> `TXTF` `1` nbcommentlines width height alphabet +> +> Comment lines +> +> Data + +- *width*: is the number of pixels each character is wide +- *height*: is the number of pixels each character is high +- *alphabet*: 2 characters, the first represents OFF pixels, the second + represents ON pixels. + +Data is then in the following form + +> character "*width* * *height* of the alphabet for the character" + +whitespace is ignored in character data. + +Here is a sample mode 1 font + +``` +TXTF 1 2 6 6 .# +Some font for the readme +By Annwan +!..#.....#.....#...........#......... +#.#.#..#####..#.#..#####..#.#........ +_..............................###### +``` diff --git a/README.org b/README.org deleted file mode 100644 index add9924..0000000 --- a/README.org +++ /dev/null @@ -1,61 +0,0 @@ -#+title: Font thing -#+author: Antoine "Annwan" COMBET -#+options: toc:nil - -A small bitmap font renderer with its own format. - -* The format - -Introducing /TXTF/ a family of text based bitmap font formats. - -The first line of a TXTF font is the following: -#+begin_quote -=TXTF= /mode/ /nbcommentlines/ /params/ -#+end_quote -Like -#+begin_example -TXTF 1 10 5 5 .# -#+end_example - -The /nbcommentlines/ parameter is the number of description or comment -lines placed before the actual font data (not including the -header). In this comment area, you may put stuff like modelines, -copyright information and/or a description of the font. - -The /mode/ is the specific fomat in the txtf familly this file is in, -the existing mode are as follow - -** Mode 1 (Monospace) - -#+begin_quote -=TXTF= =1= nbcommentlines width height alphabet - -Comment lines - -Data -#+end_quote - -- /width/: is the number of pixels each character is wide -- /height/: is the number of pixels each character is high -- /alphabet/: 2 characters, the first represents OFF pixels, the second - represents ON pixels. - -Data is then in the following form -#+begin_quote -character "/width/ * /height/ of the alphabet for the character" -#+end_quote -whitespace is ignored in character data. - -Here is a sample mode 1 font -#+begin_src nil -TXTF 1 2 6 6 .# -Some font for the readme -By Annwan -!..#.....#.....#...........#......... -#.#.#..#####..#.#..#####..#.#........ -_........................#####....... -#+end_src - -# Local variables: -# eval: (auto-fill-mode +1) -# End: