1) Create some TextLabel and set RichText on
2) Paste this text in the TextLabel text:
The text should be shown with the correct indentation:
Although the indentation is shown in the Text property of the TextLabel, it is not shown in the final result:
Issue Area: Studio
Issue Type: Display
Even if the Roblox text controls supported tabs, it probably wouldn’t look like the script in your screenshot, because the standard tab width is 8 spaces, which is a lot wider than that.
The correct way to handle this is to replace tabs with the specific desired number of spaces.
This was the first thing I tried, but spaces characters don’t take up the same space as a regular characters:
You see that what appears in Gui is different from what appears in the Text property (and both are in Studio)!
Set the font to Code or to RobotoMono and set TextXAlignment to left and this example should start working the way you expect using spaces.
This isn’t the first time we’ve been asked for tabs support, so it’s worth looking into. We’ll likely at first make tabs be 4 spaces wide, but leave out support for tabstops. For context, when tabstops are supported, the width of a tab actually changes depending on which column it was inserted.
You’re giving me workarounds.
In this case, I’ll be forced to change the font for the ENTIRE game to keep the standard aesthetic, just because I can’t use TABS!
There is another bug:
- Enter some text with spaces in front and press ENTER
- Click on the text again and press ENTER again
- Spaces in front will be REMOVED!
I opened this topic because I think this should be fixed.
But you, as part of the Roblox team, are you telling me that NOTHING WILL BE DONE about this?
Even if you could use tabs it wouldn’t change the fact that the spaces in the font you’re using are narrow and you need a lot of them to get what I gather is the desired amount of indentation.
If you want a standard amount of indentation regardless of font you would need to use separate Text Instances for the list bodies because you can’t embed a specific pixel width of indentation within text.
Thank you for your attention.
Is there a way to support tabs for copying and pasting? Running into issues where I use spaces to paste code but can’t default to tabs. This is in a plugin.
After almost 1 year, nothing has changed.
This has been fixed, a tab will now be the same width as 4 spaces. Note that tab stops are not supported, so a tab will always be the same width regardless of what column it starts from.
The use of spaces and tabs in fonts other than
Roboto Mono and others, as mentioned above, has virtually no visual difference.
However, now at least the distances are concise.
Must be why using 4
\t’s creates a massive gap now. Thanks for fixing this!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.