Change the text size on static ?
Change the text size on static ?
How can i set the size on the static text added to the scene ?
IGUIStaticText * text=guienv->addStaticText(L"", rect<int>(100,28,200,38),false,false,0,-1,false);
texto->setText(blah);
IGUIStaticText * text=guienv->addStaticText(L"", rect<int>(100,28,200,38),false,false,0,-1,false);
texto->setText(blah);
Re: Change the text size on static ?
The static text object has nothing to do with what you're asking. You need to change the size of the font. Check the FAQ's and Tutorials or do a forum search for "font size".arfgh wrote:How can i set the size on the static text added to the scene ?
IGUIStaticText * text=guienv->addStaticText(L"", rect<int>(100,28,200,38),false,false,0,-1,false);
texto->setText(blah);
Here's a couple threads that I found:
http://irrlicht.sourceforge.net/phpBB2/ ... =font+size
http://irrlicht.sourceforge.net/phpBB2/ ... =font+size
You can't - it's a bitmap font. You can scale the bitmap itself and load that as font, then you have a bigger font. Or you can search the forums for ways to include truetype fonts, those can be scaled.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
"You can't - it's a bitmap font."
are you talking about the file "fontcourier.bmp" included in the irrlicht ?
"You can scale the bitmap itself and load that as font, then you have a bigger font. Or you can search the forums for ways to include truetype fonts, those can be scaled."
can you show me a simple example to do that ?
are you talking about the file "fontcourier.bmp" included in the irrlicht ?
"You can scale the bitmap itself and load that as font, then you have a bigger font. Or you can search the forums for ways to include truetype fonts, those can be scaled."
can you show me a simple example to do that ?
Truetypefonts are discussed for example here: http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0
You can create fonts with IGUIEnvironment::getFont. The filename is usually that of a bitmap. To change the font for a single static element you can use IGUIStaticText::setOverrideFont. To change it for certain groups of elements you can use IGUISkin::setFont.
I never created a font myself, but there is a fonttool which can help you doing that.
You can create fonts with IGUIEnvironment::getFont. The filename is usually that of a bitmap. To change the font for a single static element you can use IGUIStaticText::setOverrideFont. To change it for certain groups of elements you can use IGUISkin::setFont.
I never created a font myself, but there is a fonttool which can help you doing that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
That font is saved as sourcecode (you can do so with Gimp) and included in the library.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 8
- Joined: Sat Apr 12, 2008 4:14 pm
The font tool compiled succesfully in my system (ubuntu 8.04) but when I execute the program, the title bar reads: "Unable to create fonts, your OS is not supported "
Do you know why is that?
Do you know why is that?
Blog: Lobo tuerto
En tierrra de ciegos, el tuerto es rey.
En tierrra de ciegos, el tuerto es rey.