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

[TextServer] Do not draw non-visual characters. #86065

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Dec 12, 2023

Adds some checks to skip drawing non-visual glyphs and glyphs with zero size texture.

See #85811 (review)

@bruvzg bruvzg added this to the 4.x milestone Dec 12, 2023
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected with both Label and Label3D. This text with 36 visible characters results in 36 draw calls in Forward+/Mobile:

image

Test Test  Test
Test	Test		Test
TestTestTest

Test Test Test in master results in 60 primitives in Label3D with the default settings (which includes a font outline), and 48 with this PR.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Dec 12, 2023
@bruvzg bruvzg marked this pull request as ready for review December 12, 2023 20:01
@bruvzg bruvzg requested review from a team as code owners December 12, 2023 20:01
@YuriSizov YuriSizov merged commit f79f2ef into godotengine:master Dec 14, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

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.

5 participants