-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Leading whitespaces in text are not drawn to the screen #45
Comments
Thanks for the report. This is intentional due to the word wrapping logic, and it's the behaviour of most text boxes/word processors/etc. However, if you use non-breaking spaces then I think you may get the behaviour you want. https://unicode-table.com/en/00A0/ It's unicode 160 (0x00A0) -- if you replace all the normal spaces with this then I think they shouldn't be removed. |
Thanks it works. |
Glad to hear it works :) The same solution should be usable for tabs, but you would need to replace the |
Maybe it would be better to add a parameter to |
Yeah I think that's a good idea. |
Also hitting this! In my case, I am rendering in monospaced font, so I obviously care about whitespace for alignment. Couple of other options here:
|
Now fixed thanks to @InfiniteCoder01! |
When there is leading whitespace in a text, they are not calculated by the
layout_text
method.By removing this block of code, it works as intended :
The text was updated successfully, but these errors were encountered: