Skip to content
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

Closed
1 task done
st-pasha opened this issue May 13, 2022 · 3 comments · Fixed by #1634
Closed
1 task done

Add support for sprite-based text rendering #1621

st-pasha opened this issue May 13, 2022 · 3 comments · Fixed by #1634

Comments

@st-pasha
Copy link
Contributor

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?

  • yes
@erickzanardo
Copy link
Member

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.

@st-pasha
Copy link
Contributor Author

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?

@erickzanardo
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants