allegro4 unicode bitmap font spritesheet
m c

I had a vague idea that back in a4 if you wanted a font with various code ranges, you would have to load a .dat font or something? Or use a ttf addon.

Well I wanted to have a terminal emulator with the ms dos box drawing chars so I tried to find out but it was all confusing to me. so I might hacked together something that loads sprite sheet font that recognizes the utf8 codes of the ibm437 charset from pic attached. if you more knowledgeable guys than me have useful things about this, such as tips or more unicode ranges in bitmap font sheets, I'd love it.



You may want to "forget" that you're drawing text, and consider it as a straight graphic resource. If you load / split the font image into bitmaps, it's trivial to code your text-printing function that takes a string as input.

Just be aware that char is often signed by default.
If you store the font as an array of 256 bitmaps, be sure to cast the characters when you index it: myfont[(unsigned char)(str[i])]

m c

oh right, otherwise its a negative array offset

Thread #616919. Printed from