-
Notifications
You must be signed in to change notification settings - Fork 107
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
TextTexture does not handle Chinese text well #450
Comments
@Moussa Thank you for bringing this to our attention. To better understand the issue and reproduce it, would you be able to provide a sample app that can be created by using the Lightning playground tool? It would be great if the sample app contains your work-around as well. |
Hi @uguraslan. Sure thing, this playground app shows the issue with some sample Chinese text. If you replace the original text input with the |
@Moussa Thank you for providing a sample code with the playground app. We will be looking into it and will inform you when we have a solution for the issue. |
@Moussa We are going to give the developer the capability of inserting zero-width breaking spaces (Unicode: 0x200B) at any point they wish and the Lightning text renderers will use them as line breaking opportunities in addition to normal space characters. This will allow you to use the function you've defined in your example without having to insert artificial space characters which actually affect the display of the text when word wrapping does not occur. We'll consider adding in more intrinsic support for non-Latin scripts in a plugin friendly way in the future, specifically with Lightning 3.0. But for now this feature should enable developers to implement deterministic word wrapping in a way that was not possible before. |
Fixes #450 (or at least enables developers to work around the problem)
Thank you for the addition 👍. |
We've observed that Chinese text within TextTextures do not line break correctly, resulting in Chinese text being rendered as a single long line that overflows the container. Perhaps Lightning should be applying https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages? We've worked around this internally by adding a space after characters defined in https://en.wikipedia.org/wiki/Chinese_punctuation, but it would be great if Lightning could handle this internally. Other non-latin languages are likely affected.
The text was updated successfully, but these errors were encountered: