Page 1 of 1

change font?

Posted: Thu Oct 05, 2006 8:22 pm
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);

Posted: Thu Oct 05, 2006 8:25 pm
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.

Posted: Thu Oct 05, 2006 11:20 pm
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