Outlining Fonts

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
JuicyLobster
Posts: 25
Joined: Sat Jun 07, 2008 8:55 pm

Outlining Fonts

Post by JuicyLobster »

I've been playing around with the font library and such, and I have come to the conclusion that I need to either make my own font class, ask here just in case, and ask if there is already a font class that can do this that someone might know of.

What I am trying to do is something like this:
http://img389.imageshack.us/img389/1382 ... ontmj1.png

Standard white font map with just a 1px black outline.

If someone could point me in the right direction I would very much appreciate it.

Thanks
--
Juicy, hot, and full of butter!
Fex
Posts: 4
Joined: Wed Dec 24, 2008 12:35 am

Post by Fex »

Can't you just load that into irrlicht?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You should try the fonttool from the SDK.
JuicyLobster
Posts: 25
Joined: Sat Jun 07, 2008 8:55 pm

Post by JuicyLobster »

Alright, instead of using an alpha png that generates no XML file for the font, I went to bmp, with a purple colour key, and black outline on the white text. (this way no matter what colour used the font will always be outlined in black.)

Now, a new problem arises. The spacing overlaps other characters outline, thus giving other characters random pixel additions from other characters. And since you cannot specify extra spaces between character widths with the current font tool, I dived into the source code of the font tool, and was only able to change the XML output that specifies -1 to upperleft x, and +1 to lowerright x to the area variable (thus increasing the character area by 2 width wise when the engine reads the co-ords). However changing the image output I could not do, I don't know the source well enough to, unfortunetly.

I need to be able to change the rendered image to add 1 pixel before and after each character on the pixmap/image additionally so i can have nice looking outlines.

[empty space pixel] [char pixels] [empty space pixel] [empty space pixel] [char pixels] etc..

Image to Image from Image

Any help on this new issue please? :?
--
Juicy, hot, and full of butter!
Post Reply