[SOLVED] Drawing text in different sizes

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
Some Moron
Posts: 12
Joined: Sat Jun 04, 2011 7:04 pm

[SOLVED] Drawing text in different sizes

Post by Some Moron »

I'm aware that Irr native bitmap fonts cannot be scaled, but is there a good way around this? The only obvious solutions to me are using different sized fonts (which wastes texture memory and makes certain animation effects all but impossible) and drawing each different size of text to a render target and then drawing it on a quad. (Which is probably inefficient, certainly not intuitive, and seems like it would need one render target for every different font size...?)

Are there any e.g. external libraries up to this task?
Last edited by Some Moron on Thu Aug 30, 2012 2:36 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Drawing text in different sizes

Post by CuteAlien »

Yeah, there are a few solutions. One is the one from Nalin here: http://irrlicht.sourceforge.net/forum/v ... hp?t=37296
Also in my sig you can find a link to some of my Irrlicht-snippets and there is another ttf solution which was based on the thread here: http://irrlicht.sourceforge.net/forum/v ... f=5&t=3995
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
Some Moron
Posts: 12
Joined: Sat Jun 04, 2011 7:04 pm

Re: Drawing text in different sizes

Post by Some Moron »

Thank you for the suggestions! I'd been looking at the first one and wasn't sure if it actually supported custom sizes or not, but evidently it does... the other options also look attractive.
Post Reply