January 16, 2022, 8:21pm
Any TextLabel with RichText enabled will render an invisible space character after each
\r just based on previous related bugs).
This is hugely detrimental because it means that text on new lines no longer align correctly as all their line breaks are now indented by this invisible character but the first line and all dynamic line wraps are not.
Disabling RichText shows that this whitespace character is not actually in my
.Text, but simply a bug with how RichText handles it.
Worth noting that this bug occurs regardless of whether you’re utilizing rich tags- enabling RichText on simple content will still get messed up by this.
.RichText on a TextObject with
\n characters in the text. More visible when TextXAlignment is set to Left.
RichTextIndent_Repro.rbxl (36.5 KB)
OS: Windows 10, GPU: RTX 3060, CPU: Ryzen 9 5900HS, RAM: 16GB 3200MHz
I expect \n to create a line break with no additional indent (like it does when RichText is disabled) so that it accurately represents the text string it is meant to be rendering.
See above. I included an image of the issue and a repro .rbxl for your convenience.
No full workaround, but prefixing the text with “\r” at least makes the first line align with the indent, even if all the wrapped lines still misalign.
Issue Area: Engine
Issue Type: Display
Thanks for your report, this is on the high priority list of bug-fixing right now and we are actively working on it.
September 27, 2022, 11:22pm
It looks like a fix in February was pending from
Version 512 that was never enabled.
Seems like this bug may have been forgotten, could you follow up and enable the fix?
Hi, I tried to turn on that fix but it triggered some crashes. We are working on a refactor of the pipeline and it would fix the issue in a more proper way. While I can bump this and take a look.
September 29, 2022, 4:44am
I’ve honestly decided against using RichText with TextWrapped until a few bugs are fixed. However, I appreciate the transparency and look forward to an en
riched text experience.
September 29, 2022, 5:40pm
Related bug report from a while back, possibly more details:
When the TextTruncate property is set to “AtEnd” it should truncate the text before going outside of the text label. However, this behavior is is ignored when TextWrapped or RichText properties are set to true. See screenshots below for repro.
Actual (bugged) behavior when RichText is true:
Expected behavior when RichText is true:
Actual (bugged) behavior when TextWrapped is true:
Expected behavior when TextWrapped is true:
November 5, 2022, 11:23pm
This still occurs as of 11/05/22
February 16, 2023, 9:06pm
Wandering how progress on this bug is going cause it would be great to get it patched as it ruins the use of using rich text.
February 17, 2023, 12:13am
It’s been over a year since this was named high priority. I would hate to see low priority
Can we get an update? Even a “this was taken off priority” is better than radio silence.
The bug still persists as of March 2023.
Really sad to see this issue being forgotten about for years despite it needing a fix.
There is a small workaround, when using RichText try to wrap newlines in
<font size="0"> !
While it “fixes” the issue, I’m not sure if it’s too reliable, although useful regardless.