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
Wrapping CJK text in the UI #2939
Comments
Hi @NaitLee! |
One rather easy solution might be to insert a zero width space after each character, see https://en.wikipedia.org/wiki/Zero-width_space. We could do this automatically. Any automatic method would be preferred over inserting the line breaks manually. |
This does not seem to work. I tried this:
|
This is certainly doable without any ugly insertions of break characters: I did this, directly in
(Ignore the |
I wonder if this is a libharfbuzz thing. Supposedly that's what you need for RTL text and multi-code point emojis A way to hack it might be adding extra logic in the |
Currently layout of CJK text is awkward: it only breaks after spaces (in CJK paragraphs, spaces are few and only around emoticons here), and won’t break a span of CJK characters.
I’m unsure if sole RCSS could fix the problem. Or upstream RmlUi layout system didn’t really take care about this.
(though I tried
white-space: normal
andword-break: break-all
and they didn’t work)This problem shouldn’t affect gameplay too much though, given in-game UI have short strings.
The text was updated successfully, but these errors were encountered: