JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
bump version to 0.5.8
[vor.git] / README_font.md
1 # How the font is generated, and how to edit it.
2
3 The font used in VoR is generated from the pixel layout in
4 `font_template.txt.gz`. You can edit this file easily with vim. Don't unzip it,
5 vim handles this for you. Just open it up and do `:set nowrap`. You should now
6 see the font and be able to edit it nicely with replace mode (hit capital `R`).
7
8 The font is generated from this template by creating a huge blob object in
9 povray. A small diffuse sphere is created at the location of each `#` in the
10 template file, and the result is rendered where the density of all those
11 combined spheres is high enough.
12
13 If you create a font that has considerably different dimensions you will have
14 to fiddle with a few numbers in the sources:
15
16   * update the `TEMPLATE_WIDTH` and `TEMPLATE_HEIGHT` constants in `font_guts.c`
17
18   * If you've changed the aspect ratio considerably: update the "up" and
19     "right" vectors in `font.pov` These determine the aspect ratio, and what area
20     of the coordinate space is rendered. Be sure to leave enough space around
21     the edges so the font doesn't get clipped. Don't worry about excess black
22     around the edges, it will be cropped automatically after rendering. The
23     constant `OUTPUT_WIDTH` in `font_guts.c` is in povray units.
24
25
26 The font template was created from the 10x20 font from the misc-fixed pack. It
27 was tweaked slightly in particular so the dots on the `j`, `i` and `!`
28 characters don't touch the rest of the character.