Fonts - Bitmap Fonts
Fixed width fonts are easiest to implement, but do not look as well as proportional fonts.
Proportional fonts
- store bitmaps of different widths
- store offset information to allow for decenders.
Notes:
It would be nice if we could have the simplicity of bitmap fonts without settling for the ungainly appearance of the fixed-width version. Enter proportional fonts. Proportional fonts vary in width and so the bitmap can just surround the shape of the letter. When rendering the character the current position is not advanced by a set amount after each character; instead it is advanced by the width of the character just displayed - typically one more pixel of space is added after that so the characters do not touch.
We also want to define a baseline for the character. This allows quotation marks to sit high above the line, and for character with descenders, such as g, to sit below the baseline. In order to implement a baseline, each character has an offset which says how far above or below the current position to draw the bitmap for this character.