TextLabels using RichText scale inconsistently on large screens

Reproduction steps:

In this scenario, we have a text label underneath with a UIStroke around it. Then, as a child, is another text label of size UDim2.new(1, 0, 1, 0) such that both text labels are the same exact size. Text size is scaled for both labels.

The child text label (on top) has RichText enabled.

Small and medium devices:

On small-medium screens, text labels using RichText scale as expected. The screenshot below uses the Studio simulator for “Average Laptop” screen sizes.

image

Large devices:

However, once we increase this to “HD 1080” or “Console” screens, the text label using RichText is actually notably larger than the text label without RichText despite them being the same size. The screenshot below shows how this can make the UI look incredibly ugly and difficult for players to read.

image

Expected behavior

The sizing and spacing for text labels should be consistent regardless of whether or not RichText is applied, and this should be consistent across all devices. The first image in the post shows the desired outcome.

1 Like

This has been somewhat already reported:

I’m going to presume the UI team is aware of this issue but just don’t have a fix at the moment or aren’t prioritizing one.

@CharlieGordonnn Some insight into this would be nice :slightly_smiling_face:

2 Likes

Yeah the non-RichText and RichText have separate layout pipelines so it may result in slight difference in rendering result, and unfortunately we do not have plans currently to merge these two layout methods because of the nature of how RichText works.
@MuPower In the screenshot, it does look like a big difference. Do you mind sharing a rbxm file that contains the textobject in the picture? Thank you.

2 Likes

I just realised the cause for the size difference is because ordinary text labels have a text size limit, while RichText labels seem to scale without a cap.

I think it would be great if there could be a text size cap added for RichText labels if possible to provide consistency (e.g. as an option/property). Any idea if this could be possible?

The rbxm file:
RichTextLabel.rbxm (6.2 KB)

1 Like

Hi @MuPower , adding a Text size limit internally might be a breaking change that makes games that have large RichText to not work. Do you think it possible to add a TextSizeConstraint to your text labels?

1 Like

That’s fair. Constraints should work, thank you!