Cocos2d-x’ TTF font rendering has a lot of features but it desperately lacks batch rendering. Using TTF fonts in a screen that displays lots of information or many tiny bits might give significant draw call (and performance) spikes.
Using Bitmap fonts it the general solution to that, but it’s not convenient to be limited to the characters that are shipped with the game. Player names might contain special characters or the game might need to be localization to a language with the Cyrillic alphabet / Chinese / etc.
Since Cocos2d-x TTF font rendering seems to be very powerful, it should be possible to render all characters requested by a certain language to a texture and just render the needed Bitmap font at runtime. If additional characters are needed, they could be added to the texture.
Has anybody ever realized something similar to that?
Could this feature be included in cocos2d-x?
If it’s not there yet, how could I tackle the implementation of this feature myself? It would be cool to get some insights from somebody who has experience with the internals of the current font rendering.