Hello everyone,
I am making a game in C++ and I want to add text.I have a bitmap font which is not fixed-width (all the characters don't have equal width).
Assume I have a function Texture::Draw(rect,x,y) which draws the region rect of the texture at (x,y).
I want to know what's the best way to store data for the font. I've got a few ideas:
1. To make an array of Rect-s (where Rect is my class that implements a rectangle).
2. To make a text file which stores the data about each character.
I would like to know which one is better,and is there a better on,and also how do ttf fonts store data about their characters?
Thanks,
MatejaS