-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
Add support for sprite-based text rendering #1621
Comments
This is definitely something that I look forward for a while now, like you mentioned we anticipated this that is why we have an abstract text rendering API (even though we only provide one implementation). One thing to consider here, is that we have also thought on providing tools for the user to make it easier to create btimap fonts. Such tool could live inside our sprite mapping tool Fire Atlas. Lmk if you want to collaborate to make both things. |
This sounds very interesting! So, how do you see Fire Atlas in the long term -- is it just a tool for annotating images, or would it be more like a pixel editor? |
I don't envision it as a pixel editor, but rather an editor that you can import assets and it would just map it for you, doing a pixel editor is a way more complicated matter and I wouldn't like to tackle such a challenge now since there are awesome tools that does that already :) |
Problem to solve
Currently we support rendering text via Flutter's
TextPainter
mechanism, which offers a variety of font and style choices.However, sometimes a game may want to use a different approach and render text using custom images for every character. This could be either for stylistic purposes, or to reduce the bundle size, or to create special alphabets, or for any other purposes.
One concrete example is the TRex game, where the spritesheet contains characters for "0123456789HI", but displaying the score using those characters is complicated without a dedicated spritesheet-based renderer.
Note that we have anticipated the need for custom text renderers since long time ago, so this is a feature that we always wanted to implement.
More information
Are you interested in working on a PR for this?
The text was updated successfully, but these errors were encountered: