Say I have a true type font called myCoolFont.ttf. This font is described, along with its size, in a font xml file. So I'd load the font like this:
Code: Select all
CEGUI::FontManager::getSingleton().createFont("myCoolFont.font");
I have two StaticText boxes. Both use myCoolFont.ttf.
I want one staticText to have a font size of 10, and the other a size of 15.
How do I do that without loading the same font twice?
I know you can dynamically change the size of a font like so:
Code: Select all
Font *f = CEGUI::FontManager::getSingleton().getFont("FontName");
f->setProperty ("PointSize", 12);
But that will change that font instance, and everywhere it is used. Is it possible to clone a font?