Page 1 of 1
Creating a textured font
Posted: Fri Jan 11, 2013 8:25 pm
by WarpEnterprises
Is it possible to create a textured font?
I now it's possible by using ImageFont, but I was searching for a way to "print" to an image and manipulate the imagedata to get some texture where there is the glyph color set.
But it seems that "print" only works to screen and not to an image. Is this true?
Re: Creating a textured font
Posted: Sat Jan 12, 2013 6:10 am
by substitute541
In short, it's hard to do. And what do you mean " 'print' "? I see you're new to the forums so, welcome
.
Re: Creating a textured font
Posted: Sat Jan 12, 2013 5:55 pm
by WarpEnterprises
...I already suspected that it's not easy
Sorry - with "print" I meant
love.graphics.print
I think I found a viable solution. First I tried love.graphics.newStencil -> this did not work for print as the whole square of each glyph is masked.
Then I used Canvas to print the text (say in the first 100 lines), draw the texture (after the first 100 lines), then transfer the texture into the text with Canvas:getImageData, getPixel and setPixel, and finally put the imagedata in an image for later use.
Re: Creating a textured font
Posted: Sat Jan 12, 2013 8:13 pm
by LPGhatguy
I'd say your best bet is going to be shaders.