change font?

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
wheatas
Posts: 25
Joined: Fri Sep 15, 2006 8:21 am

change font?

Post by wheatas »

Hi,

I'm trying to change the font of my programm with the sample shown in IOtutorial.

now my questions, is it necessary to use a .bmp?
Is there any other way to change fonts?

Here is my code for font changing...
and its not working... :(

IGUISkin* skin = environment->getSkin();
IGUIFont* font = environment->getFont("../bitlow.ttf");
if (font)
skin->setFont(font);
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

You can't use true type fonts, unless you use the true type extension which you should be able to find by searching.

In the tools folder of the irrlicht folder there is a program called IrrFontTool or similar, use that to create a new bitmap font and load that instead of the ttf file.
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can convert the bmp to any format afterwards, though. The next Irrlicht release will support antialiased fonts and makes use of alpha values of images. Thus, it usually uses png format. But this can also be used for normal fonts. All fonts are still bitmapped, though. TrueType extension can be found on the patch page, follow my www-link
Post Reply