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

Fix ZWSP word break & seperate Font caches #420

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Conversation

wouterlucas
Copy link
Contributor

This PR adds support for Zero-width space character in both the SDF and Canvas font engines. By adding the ZWSP character the font engines will word-break when there isn't enough space to render the text.

Additionally, during testing ran into a font cache collision when using textRendererOverride - resolved this by splitting out the font cache in a sdf_ and canvas_ cache instead.

Split cache between SDF and Canvas fonts to avoid collision when using the `textRendererOverride` property. Albeit this property is mainly used for testing, it generally feels safer to split Canvas & SDF font caches to avoid name clashes in the future.
@wouterlucas wouterlucas added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit fe104f6 Oct 28, 2024
2 checks passed
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.

2 participants