TextWrapped behavior can be improved

For example “aaaa bbbbbbbbbbbbbbb”

Most text editors do it this way, but the current behavior takes up 3 lines:
55ff36db5b0ea6808b7689c9e87c8d8ef0e18ffb.png

This is what it should do:
b7aab769bb234491ac74778fe61934c8d91883c8.png

It’s going to split the second word in half either way :confused:

15 Likes

I see what you’re implying, but how would the text system discern words that can and should not be split before starting a new line?

Example Assuming the text areas in question are only 12 character long:

“Hello, my pseudonym is Frank Smith.”

Hello, my
pseudonym is
Frank Smith.

Hello, my ps
eudonym is F
rank Smith.
It would be nice if text boxes didn't start a new line because of a long word but frankly it starts new lines so it doesn't make ugly cuts before it needs to. If you really want to work around this issue try to manually cut words so TextWrapped recognizes them as separate words:
Example

“Evacuate the garbage disposal immediately.”

Evacuate the
garbage
disposal
immediately.

Evacuate the
garbage dis-
posal immed-
iately.

You can just use split the words without the hyphens but imho it just doesn’t look as good as the current TextWrapped behavior.

1 Like

It’s not that complicated, you just need to wait until you get to the end of the word, then check if the word’s total width is greater than the container’s width.

I implemented it in my chat gui to help with spam.
image.png

Yes please! I want to be able to enable text scaling and not worry about words being cut off.

1 Like