Page 1 of 1

Increasing the font size in guienv

Posted: Sun Aug 30, 2009 1:17 am
by kparamas
Hi,

I have created a new font.

But how to apply that font to the text displayed in GUI Menu and Messge Box. I am not able to change its default font.

I tried guienv->getFont(<My File>);

<My File> - I tried giving the bmp file and the xml file. But both didnt work.

Posted: Sun Aug 30, 2009 1:31 am
by B@z
you can load fonts with guienv->getFont(filename.xml)
then you get the pointer of the font, what you have to setup.
for example, just drawing out some text:

Code: Select all

IGUIFont* font = guienv->getFont("blabla.xml");
font->draw(...);
i think you can change static text's font with text->setFont(font), but im not sure, not really using them.

Posted: Sun Aug 30, 2009 11:17 am
by Sylence
You can change the default font with the skin.

Code: Select all

IGUISkin* skin = gui->getSkin();
skin->setFont( font );