bevy
bevy copied to clipboard
Ui Text does not word wrap if next "word" begins with a dot
Bevy version
0.13
What you did
I have a text that ends with three dots.
What went wrong
The three dots overflow the text node. I have word wrapping and clipping in both axes set. The red box is the height and width of the text node child. The parent is the much bigger bubble image.
As long as the word starts with a dot, it's not wrapped.
Finally wraps when leading dot is removed.
I did some investigation of this upstream at https://github.com/alexheretic/glyph-brush/issues/174 and confirmed that #10193 won't help with this.
Though I closed that issue, it seems like Bevy or the library it is using for text layout should behave better. I tested a bunch of browsers and they don't seem to have this issue, though I suspect they are varying their wrapping behavior based on container/text size or something fancy.
As a dirty workaround, you might be able to explicitly add soft break opportunities to your text by inserting \u{200B} (zero-width space) characters.
Thank you for the investigation and suggestion!
Unfortunately, it looks like cosmic-text did not save us. This still seems to be an issue.