Skip to content

Clear text measure cache when loaded fonts have changed #1309

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

Merged
merged 1 commit into from
May 16, 2025

Conversation

ahocevar
Copy link
Member

This pull request fixes an issue where line breaks in texts may be inserted incorrectly or missing. That is when text width measurements were done before the correct font was loaded. The measure cache was never cleared.

This pull request ensures that the text measurements are cleared when new fonts are loaded, so text will be redrawn with the correct font and the correct line breaks when the correct font has finished loading.

@ahocevar ahocevar merged commit 7c8974a into main May 16, 2025
1 check passed
@ahocevar ahocevar deleted the clear-measure-cache branch May 16, 2025 18:57
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.

1 participant