How do you do your own fonts? I don’t want a heavyweight algorithm (freetype, truetype, adobe, etc) and would be fine with pre-rendered bitmap fonts.
I do want anti-aliasing, and would like proportional fonts if possible.
I’ve heard I can use Gimp to do the rendering (with some post processing?)
I’m developing for an embedded device with an LCD. It’s got a 32 bit processor, but I don’t want to run Linux (overkill – too much code/data space for too little functionality that I would use)
C. C++ if necessary, but C is preferred. Algorithms and ideas/concepts are fine in any language…
-Adam
In my old demo-scene days I often drew all characters in the font in one big bitmap image. In the code, I stored the (X,Y) coordinates of each character in the font, as well as the width of each character. The height was usually constant throughout the font. If space isn’t an issue, you can put all characters in a grid, that is – have a constant distance between the top-left corner of each character.
Rendering the text then becomes a matter of copying one letter at a time to the destination position. At that time, I usually reserved one color as being the ‘transparent’ color, but you could definitely use an alpha-channel for this today.
A simpler approach, that can be used for small b/w fonts, is to define the characters directly in code:
The XPM file format is actually a file format with C syntax that can be used as a hybrid solution for storing the characters.