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

Feature/text #62

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Feature/text #62

wants to merge 27 commits into from

Conversation

gustavo-tomas
Copy link
Owner

@gustavo-tomas gustavo-tomas commented Sep 23, 2024

Adding smooth anti aliased text (with multiple SDF channels). I still didn't manage to make it perfect like the msdf examples, but it is good enough in most use cases.

Some features/fixes we would like to implement:

  • Fix msdf gen submodule. For now the submodule points to the original repo. We changed some files in that repo so we need to create a fork before merging.
  • Add freetype lib. The msdf gen uses freetype to load fonts. We should also package freetype.
  • Convert font into a resource. For now it is a standalone class, but we would like to keep it as a resource like textures and models.
  • Create TextComponent. We need to integrate the text into the ecs. This also include component serialization/deserialization.
    • TextComponent struct
    • Serialization/Deserialization
  • Create Text UI. Besides the component, it would be nice to have a text box in the editor to type out some text and see it live.
  • Cache generated font atlases. Right now we generate an atlas for every font every time we load them. Ideally we should save the generated font atlas into a .png or binary (maybe with a pretty big resolution) and simply load it.
  • Optimize text rendering. Right now performance is pretty bad. It would be amazing if we could batch some draw calls before rendering it.

Fixes #68

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

Successfully merging this pull request may close these issues.

Text
1 participant