Hey there! this is the location of the PD font rendering code I just grokked up. It features these screen shots:
It is contained in two source files:
The font file creator
The font displaying routine, which also tests it.
The renderer should work on windows 2000 in dev-c++, the generator should work on linux. The font is compiled-in in an array called gimage. It should be a char array in the format as exported by GIMP, but without the fancy image header stuff. Make sure all glyphs are aligned. It saves to .cff files (well... "output" but rename that to a .cff). Each CFF file needs an accompanying .ttb file, which contains the mapping for each ascii character at the given offset by its ascii code. So, for changing the "A" rendering to glyph 42, change the byte at location 65 (the ascii code for 'A') to 42 and it will use glyph 42 for rendering each 'A'.
Glyphs are counted from the upper-left hand corner going to the right at first, and then per row. It numbers from 0, so the first row is 0-15 (usually), the second is 16-31, the third is 32-47 etc. If your font contains all ascii characters from 32 to 127 in order you can use the small.ttb file for your font. If not, hack one together yourself.
The font generator makes a palette from the colors encountered, and then proceeds to not store it. Result is that the colors are converted to equal numbers in the binary font file. To convert them, for small numbers of colors, do a mass search & replace on hex values. The first color encountered is a 1, the second is a 2 etc. Fully visible drawing is 0xFF, fully transparent is 0x0. See for examples, again, the existing fonts.
Invoke the renderer with . It does not do any checks for sanity as this wasn't intended to be the best program in allegro, but a good renderer. It probably just crashes.
You can type using all the keys you have. If you type something it doesn't recognise it might crash. Making a screenshot using print-screen 100% certainly crashes it, but the screen shot is made.
Done typing now, will just upload the files.
The fonts:
small cff ttb
medium cff ttb
sylvain cff ttb
See me on the MT forum under the name "Candy" or mail me at the mail address found there. Cya!