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

Remove Scene dependency from the TextServer, use scalable hex box font instead of built-in bitmap one. #53342

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Oct 2, 2021

Part of #53295

Removes Scene dependency from the TextServer (was used to load hex box font texture).
Instead of textures, generate hex code glyphs from the code (equivalent of 7-segment display text), also make it scalable.

Before:

Screenshot 2021-10-02 at 23 53 09

After:

Screenshot 2021-10-02 at 23 49 04

@bruvzg bruvzg added this to the 4.0 milestone Oct 2, 2021
@bruvzg bruvzg requested review from a team as code owners October 2, 2021 21:03
@akien-mga
Copy link
Member

akien-mga commented Oct 2, 2021

The "after" screenshot lacks the 0 0 hex box, is that expected?

@bruvzg
Copy link
Member Author

bruvzg commented Oct 2, 2021

The "after" screenshot lacks the 0 0 hex box, is that expected?

0x00 is a bug from the old version of the engine, and should be fixed in the current master (zero are control chars that should not be displayed - line breaks, zero width spaces inserted by the TextServer for justification, etc.).

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Feels cleaner too as it's well encapsulated now.

@akien-mga akien-mga merged commit 84e4cfb into godotengine:master Oct 3, 2021
@akien-mga
Copy link
Member

Thanks!

@bruvzg bruvzg deleted the hex_font_7 branch October 3, 2021 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants