Left-aligned text can result in spaces at the start of lines. This issue is not present in center and right aligned text.
The issue is visible in the screenshots below (with label debug draw turned on):
Actual:
Expected:
I've managed to fix the issue, but before I submit a PR, I need some input regarding the handling of text in this situation where there are spaces between words, like this:
This is just simple text, with, no XML tags. Testing the basics. Testing word-wrapping. Testing, Testing, Testing
In all text displays/editors I've entered that text into, the trailing spaces/leading spaces are always removed, but, if the spaces happen to be in the middle of a sentence, then they are not removed. At the moment, the implementation of RichText (with plain text) will delete all spaces except 1, but is that the desired behavior?
To highlight this issue, this is the display in an external editor:
Sample 1:
Sample 2:
Sample 3:
In Axmol/cocos2d-x, this is the result (regardless of alignment, always results in a max of 1 space between words):
Should this remain as-is, or should RichText reproduce the spaces between words (assuming the spaces are not at the start or end of a line)?
Left-aligned text can result in spaces at the start of lines. This issue is not present in center and right aligned text.
The issue is visible in the screenshots below (with label debug draw turned on):
Actual:
Expected:
I've managed to fix the issue, but before I submit a PR, I need some input regarding the handling of text in this situation where there are spaces between words, like this:
This is just simple text, with, no XML tags. Testing the basics. Testing word-wrapping. Testing, Testing, Testing
In all text displays/editors I've entered that text into, the trailing spaces/leading spaces are always removed, but, if the spaces happen to be in the middle of a sentence, then they are not removed. At the moment, the implementation of RichText (with plain text) will delete all spaces except 1, but is that the desired behavior?
To highlight this issue, this is the display in an external editor: Sample 1: Sample 2: Sample 3:
In Axmol/cocos2d-x, this is the result (regardless of alignment, always results in a max of 1 space between words):
Should this remain as-is, or should RichText reproduce the spaces between words (assuming the spaces are not at the start or end of a line)?