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?
Creating a textured font
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: Creating a textured font
In short, it's hard to do. And what do you mean " 'print' "? I see you're new to the forums so, welcome .
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
- WarpEnterprises
- Prole
- Posts: 3
- Joined: Fri Nov 16, 2012 5:10 pm
Re: Creating a textured font
...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.
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.
- LPGhatguy
- Prole
- Posts: 14
- Joined: Thu Aug 09, 2012 12:57 am
- Location: Montana, United States
- Contact:
Re: Creating a textured font
I'd say your best bet is going to be shaders.
Who is online
Users browsing this forum: No registered users and 5 guests