-
Notifications
You must be signed in to change notification settings - Fork 109
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
Regression with rendering text that uses normal spaces #488
Comments
We used this feature to support rendering text that changed colors in the middle of strings. So, if there is another better method for doing wordWrapWidth and allowing for But what we were looking to resolve was..
So we would instead write:
Then we could render the small sections of text, calculate where they should go, and then place them in those empty spots. This kept the overall word wrapping algorithm working and allowed for the alignment to be correct. With this, that strategy no longer works. But, if there was a better way to handle inline text colourization that wouldn't matter! |
Thanks @itsjamie for the report. Have you looked into the Advanced Text Renderer at all for what you're trying to do? https://lightningjs.io/api/lightning-core/interfaces/lightning.textures.texttexture.settings#advancedRenderer |
That's exactly the kind of pointer I was hoping for we had missed. Thanks @frank-weindel. I'll get us to convert this particular section of code. It also has made us change to using padding in a few other places where prior we had used whitespace. I wouldn't consider this a high priority in comparison, but will keep it open in case others also relied on the spaces not being trimmed for other reasons. |
Having a text texture with extra non-breaking space characters in a text element that has wordWrapWidth enabled seems to have regressed with the implementation of the Zero Width Spaces for languages like Chinese.
If you take the string
reproduction
, and run it through the splitWords function, the space character is dropped from the returned match, leading to the space no longer being considered part of the rendering.The text was updated successfully, but these errors were encountered: