1
Feature requests / Re: Make sf::Font abstract, in order to make sf::Text re-usable for bitmap fonts
« on: June 26, 2014, 11:51:43 pm »
I just grab a texture which has all the letters. The constructor also takes a "mapping" from characters to indices. Otherwise I mostly copied the interface of sf::Font, returning an sf::Glyph, and not supporting italic/bold/...
I've never looked at other bitmap fonts, but I imagine it would be difficult to find a generic way to support them, but it might be possible to support at least the "letters on one texture" type (with some virtual functions for customisation).
If you are really interested, I could clean the code up some more and then post it. It's really nothing special though
For me, the most important point would be the change of making sf::Font a suitable base class to use, so that I can actually implement my own BitmapFont class without having to redo sf::Text and whatnot
I've never looked at other bitmap fonts, but I imagine it would be difficult to find a generic way to support them, but it might be possible to support at least the "letters on one texture" type (with some virtual functions for customisation).
If you are really interested, I could clean the code up some more and then post it. It's really nothing special though
For me, the most important point would be the change of making sf::Font a suitable base class to use, so that I can actually implement my own BitmapFont class without having to redo sf::Text and whatnot