Increasing the font size in guienv

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kparamas
Posts: 17
Joined: Fri Jun 26, 2009 10:00 pm

Increasing the font size in guienv

Post 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.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post 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.
Image
Image
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

You can change the default font with the skin.

Code: Select all

IGUISkin* skin = gui->getSkin();
skin->setFont( font );
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Post Reply