Font size

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
EViruS
Posts: 19
Joined: Sat Jul 07, 2007 8:32 pm

Font size

Post by EViruS »

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 »

You can't do this
EViruS
Posts: 19
Joined: Sat Jul 07, 2007 8:32 pm

Post by EViruS »

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 »

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 »

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 »

use font->getTextDimension() to get the size. This doesn't work with text with newlines, you'll have to split it yourself.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

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 »

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... :roll:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply