Font scale

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
i245
Posts: 8
Joined: Sun May 20, 2007 5:16 pm

Font scale

Post by i245 »

Hi,
How to change font size? I was looking for it, but i don't found anything.
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Font scale

Post by randomMesh »

You can't change the size of a font. Instead you need to create a new font with the font tool and load that.
"Whoops..."
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

Thanks for the Hint, gonna create something to do this, so that you could simply load a large font and then scale it smaller as you need.
i245
Posts: 8
Joined: Sun May 20, 2007 5:16 pm

Post by i245 »

ACE247 wrote:Thanks for the Hint, gonna create something to do this, so that you could simply load a large font and then scale it smaller as you need.
OK, I am waiting for it.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Most of the time this isn't what you want. If you really need dynamically scaling fonts you should use one of the various Opentype font plugins, or create some OS-specific IGUIFont implementation.

The reason why are:

If you scale down a bitmap font without mipmaps, you'll get missing pixels, it will look corrupted and chunky. If you scale up a bitmap font without texture filtering then it will be pixellated.

If you scale down a bitmap font and it has mipmaps, the letters will bleed into each other. The same thing will happen if you scale one up and use texture filtering to smooth it, unless you hack the font creator to have huge borders around the letters.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Post by ACE247 »

Ok I've given up on doing this, Bitplane is right.
Things start looking weird when scaling.
PS: even the big game's like Call of Duty MW and Crysis, dont use font scaling. They actually have different size fonts in their game files!
i245
Posts: 8
Joined: Sun May 20, 2007 5:16 pm

Post by i245 »

Thanks all. I will create new fonts.
Post Reply