Smooth fonts?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Smooth fonts?

Post by Andi|xng »

Is there any possibility to "antialias" Irrlicht's bitmap fonts?
Here is a example of my font (3x zoom):

Image

But when I use this font, I get this (3x zoom):
Image

It seems, as if all pixels that are not completely black are interpreted as white pixels.
I know, that Irrlicht has no problems with handling 32 bit images (8 bit alpha). Why isn't is possible to use smooth fonts? Or is there any possibility? If yes, how? Thank you :)
Last edited by Andi|xng on Wed Aug 24, 2005 9:10 am, edited 1 time in total.
Fred

Post by Fred »

The links to your images are wrong - it asks me to login to some site to view them.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

You are right... Sorry for that :(
Now it should work... Any ideas?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

looks like the font code uses a mask, pixels are either on or off. If you want smooth edges I'd suggest merging the the code to the animated sprite class on the wiki and the font loading code to make a 'text mesh' node that can make use of all irrlicht's material options... and sharing it of course :)
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: Smooth fonts?

Post by niko »

Andi|xng wrote:alpha). Why isn't is possible to use smooth fonts?
Because I didn't implement it yet. But I put it on my list now, with a little luck it will be in the next version.
Guest

Post by Guest »

Irrlicht is great.. it rocks. But I ditched the font making stuff and popped in my own bitmap font class. Make the fonts in photoshop with outlines, strokes, drop shadows etc.. magic wand surround them, cut them out, add a mask layer and save as png. voila perfectly smooth alpha fonts with variable colour from in the engine.

Irrlicht makes it easy to add this - use draw2dimage in your font class.. the one i have now is extremely fast.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

Since I am not a C++ programmer, but using the Java binding Jirr, I can not implement my own font class.
But it's very great to hear that it is on the ToDo-list now. Thanks, Niko :D
Post Reply