-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Long CJK text overflows without wrapping #14837
Comments
This was in the back of my mind when thinking about localisation support for text flow. The way I was going to try is to integrate International Components for Unicode with framework - the library in question provides support for finding potential word break location in a text. |
A good start would just be to wrap at any character, which does look to be what the browser is doing for chinese at least. |
Because I was poking around text flow localisation work anyhow I went to check how big would the overhead involved with adding ICU be. And the results are... not encouraging. Test cases were: 1 single word, the first paragraph of lorem ipsum, and the first paragraph of the first google search result for "japanese lorem ipsum". Maybe I screwed up my benchmark but I did expect something like this to happen. Probably best to use a naive implementation based on character ranges, then, until someone notices that doesn't work 100% at least. |
- Closes ppy/osu#10085 - Closes ppy/osu#14837 I'm not really considering the performance implications of this, just looking to get a baseline more-correct behaviour in place. The change is basically a best-effort heuristic, although I did use a slightly smarter split method for CJK to attempt to ensure no hanging punctuation.
- Closes ppy/osu#10085 - Closes ppy/osu#14837 I'm not really considering the performance implications of this, just looking to get a baseline more-correct behaviour in place. The change is basically a best-effort heuristic, although I did use a slightly smarter split method for CJK to attempt to ensure no hanging punctuation.
Describe the bug:
See the comparison for this map's comment section:
Lazer's beatmap overlay:
Web:
Long comments in English works just fine, such as those in this map.
osu!lazer version:
2021.916.0
Logs:
Not applicable
The text was updated successfully, but these errors were encountered: