Page 1 of 1

Outlined text

Posted: Tue Feb 25, 2014 9:45 pm
by Bonfires Down
Hi,

Is there an easy way to draw outlined/stroked text. Any good library?

Re: Outlined text

Posted: Thu Feb 27, 2014 2:54 am
by Cartread
There's a simple outlined font here: https://love2d.org/wiki/Tutorial:Fonts_and_Text
I don't know of a library that outlines.
I haven't seen outlined text in many games (flash has drop shadows of some kind).

I've tried drawing the font black up,down,left and right 1 pixel then drawing color on top (draw 5 times), but this causes a spike in CPU.
Drawing 5 times to ImageData or Canvas could work?
Personally, I ended up making a font .png in photoshop (did the yellow character seperation by hand).

Re: Outlined text

Posted: Thu Feb 27, 2014 9:40 am
by veethree
I was gonna try to make outlined text yesterday but kinda gave up.

What I was gonna do is first draw the text to a canvas, then use a shader to blur it, then apply another shader that forces the alpha to 1. Then Draw the normal text over that. I'm pretty sure that would work but I haven't tested it.