New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outline / Stroke text font #1937
Comments
Hi, thank you for using Ebiten! There is no such feature unfortunately so far. I'll add a task as a new feature. Yes, I think it's possible with shaders. Rendering a text on an offscreen once and rendering the offscreen onto the destination with a shader (to render the border) should work. Let me think for a while... |
Thank you! If it helps anyone else, a nice workaround I'm using now is to just use a font that has both a filled and an outlined variant, for example: https://www.dafont.com/becak.font |
A rough, but simple way to work around this is to simply render the font multiple times, offsetting it and changing the color to make outlines or shadows. Outlines would be blocky, though~ |
@eihigh already has a solution on this issue :-) |
https://pkg.go.dev/github.com/eihigh/canvas#Font As I expected, this is only for a SNFT font |
Yes, I believe its functionality is adequate. https://github.com/eihigh/canvas/blob/v0.0.2/font/font.go#L20-L32 |
I see. I think I can implement a similar thing with the semi-official library https://pkg.go.dev/golang.org/x/image/font/sfnt#Font and Ebitengine's vector library. |
Though I didn't add any new APIs, I could make a proof of concept. In order to make a new API, we have to consider an API to accept |
If we add a new API, we have to consider other things related to text. I'll reset the milestone to v2.6.0. We need to redesign text-related things. |
Hello, hope you're doing well. Love Ebiten! I'm making a game with it for fun. One thing I'd like to do is draw text with an outline/border around it, for example white font with a black border. Do we know if something like this is possible, e.g. with shaders etc?
The text was updated successfully, but these errors were encountered: