osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

TextFlowContainer should wrap on individual characters as a last resort

Open smoogipoo opened this issue 3 years ago • 5 comments

In order to not overflow the parenting container, TextFlowContainer should be able to resort to wrapping on an individual character basis. This will need additional consideration for e.g. links (https://github.com/ppy/osu/issues/10085).

smoogipoo avatar Jan 31 '22 10:01 smoogipoo

Semi-related: https://github.com/ppy/osu/issues/14837

bdach avatar Jan 31 '22 16:01 bdach

I Think, it same case about this.

In osu!web

image

In osu!lazer

image

baharsah avatar Feb 16 '22 19:02 baharsah

@baharsah the issue you describe above is unrelated. the component in lazer shown on the screenshot is not even using text flow right now.

bdach avatar Feb 16 '22 19:02 bdach

How does the TextFlowContainer decide where a line break should go? Is it some part of computeLayout? I noticed this also affects multiplayer chatrooms, e.g. if a long, unbroken row of characters is sent, it overflows that chat boundary as well. osu_2022-09-04_21-05-46 I was about to post an issue on the main osu! repo, but I just about stumbled into this issue. Would it make sense to do that, so that others are aware it's a known bug?

Spooghetti420 avatar Sep 04 '22 20:09 Spooghetti420

How does the TextFlowContainer decide where a line break should go? Is it some part of computeLayout? I noticed this also affects multiplayer chatrooms, e.g. if a long, unbroken row of characters is sent, it overflows that chat boundary as well.

See TextChunk.SplitWords() for the answer to that.

I was about to post an issue on the main osu! repo, but I just about stumbled into this issue. Would it make sense to do that, so that others are aware it's a known bug?

It would not make much sense as it's the same issue.

bdach avatar Sep 04 '22 21:09 bdach