Skip to content

Conversation

yassilah
Copy link

Currently, when using overflow: break on Text, the system will break the line even if the edge characters are empty spaces. This PR fixes it by skipping the width calculation when the first character is an empty space and then trims each line at the end. It also recalculates the right lineWidths and renders properly both with textAlign: left and textAlign: right.

Before:
Capture d’écran 2024-12-23 à 12 19 32
Capture d’écran 2024-12-23 à 12 20 48

After:
Capture d’écran 2024-12-23 à 12 19 41
Capture d’écran 2024-12-23 à 12 20 39

@Ovilia
Copy link
Member

Ovilia commented Sep 3, 2025

Thanks for your contribution. I do think this should be enhanced. Along with this case, there are also cases with punctuation. I'm going to make a full test of these cases and fix them in #1138. Let's see by then how we should do with this PR.

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