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.
EViruS
Posts: 19 Joined: Sat Jul 07, 2007 8:32 pm
Post
by EViruS » Sat Jul 07, 2007 8:38 pm
How to change font size without fontmap recreating?
Nadro
Posts: 1648 Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland
Post
by Nadro » Sun Jul 08, 2007 9:09 am
You can't do this
EViruS
Posts: 19 Joined: Sat Jul 07, 2007 8:32 pm
Post
by EViruS » Sun Jul 08, 2007 9:23 am
Nadro wrote: You can't do this
It's very uncomfortable. Why this feature absents in engine?
Atraides
Posts: 18 Joined: Wed Jun 06, 2007 1:09 am
Location: Australia
Post
by Atraides » Sun Jul 08, 2007 10:39 am
you can do it if you use the True Type font addon (i believe), that ive seen floating around on the forums. Just try searching for it.
Btw True Type Fonts which are resizable will ultimately require more resources to use than the image counterparts. I believe that images are used because they are optimal for this purpose.
Cheers
Courtney
Clash
Posts: 80 Joined: Thu Apr 19, 2007 4:20 pm
Post
by Clash » Sun Jul 08, 2007 12:25 pm
Is there a way to get the text size? I mean I say 'hello' and it is 80x16 pixels, is there a way?
bitplane
Admin
Posts: 3204 Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:
Post
by bitplane » Sun Jul 08, 2007 2:36 pm
use font->getTextDimension() to get the size. This doesn't work with text with newlines, you'll have to split it yourself.
Clash
Posts: 80 Joined: Thu Apr 19, 2007 4:20 pm
Post
by Clash » Wed Sep 26, 2007 11:39 pm
bitplane wrote: use font->getTextDimension() to get the size. This doesn't work with text with newlines, you'll have to split it yourself.
Sorry to revive this thread but this function does not exist, how can I get the size of a text drawn with draw()? Thanks
Acki
Posts: 3496 Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:
Post
by Acki » Wed Sep 26, 2007 11:52 pm
if you look at IGUIFont in the api (docu) you'll find that the function is called
IGUIFont::getDimension(const wchar_t *text) ...
Just learn how to use the docu...