tank-dev / tank

A 2D C++ game engine taking inspiration from FlashPunk
Boost Software License 1.0
12 stars 3 forks source link

BitmapText assumes ASCII #81

Open qualiaa opened 10 years ago

qualiaa commented 10 years ago

char mappings are not guaranteed to be ASCII, or even contiguous, so the code which indexes the fontmap is implementation defined.

A much better alternative would be for the user to supply BitmapText a map, i.e. an std::string copy of the fontmap ("!abcdefg..." for lowercase letters in alphabetical order, preceded by an !).