UIScale breaks/cuts off text, and still has TextFits = true

When using UIScale along with AutomaticSize on TextLabels, on some specific Scale values, the text begins cutting off.

Minimal repro file:
uiscale repro.rbxl (50.3 KB)
The text inside gets cut off, despite it using AutomaticSize.
RobloxStudioBeta_mhRq3XnFIN
(Text used: This is a long sample text description. the last word is cut off)

Additionally, even if the text isn’t originally cut off, it can begin cutting off if you change display scales. An example is seen below:


In the video, I’m originally at 150% scale, which clips the UI text. When I change the scale to 100%, it fixes itself.

2 Likes

@CharlieGordonnn thought I should ping you, as you had originally reported this same issue as fixed before :sweat_smile:

1 Like

This happens quite a lot too on a game I’m working on called Anime Vanguards. Oh wait we’re both working on it

2 Likes

Hi @PysephDEV I think this issue should be fixed now! Here a screenshot from your repro place:

If you get a chance, could you please verify that the issue is fixed for you? Thanks!

Hi! Our testers still report the issue occurring on their end in our game. I’ve isolated the UI component which displays this issue.
UI.rbxm (5.9 KB)
It’s TextFits value is set to false, however the text is nonetheless cut off, which feels relevant enough to the original issue.

OK thanks for the info! I opened the .rbxm you provided in Studio and the text doesn’t look cut off?

Can you share a screenshot of the UI component with the issue please? Thanks!

Strange, this was old UI that I hadn’t finished isolating–not sure why this was the file that was uploaded to DevForum. Does this look correct on your end?
NewUI.rbxm (5.9 KB)

Hmm, yes that file displays correctly in my Studio but I suspect we may have different monitor DPIs and OS Scaling values, so the pixel rounding will be different between our Studio instances.

I think what is going on is that for certain UIScale values, the inner TextLabel doesn’t have enough space (in rounded pixels) to display all the contents, while still fitting within the container Frame. If RichText=false currently, then the TextLabel will just truncate the extra text. If RichText=true, then the TextLabel’s contents are allowed to exceed its container (with AutomaticSize). So I think that’s what is happening:

RichText=false:                                                 RichText=true:

Some solutions could be:

  • Make the Frame container larger to fit the text
  • Enable AutomaticSize on the Frame container
  • Enable RichText on the child TextLabel (if overflowing the container is desired)

Would any of these solutions work for your usecase?

The container frames actually did have AutomaticSize=Y enabled; I had just disabled it while minimizing the repro file. Here’s the unmodified UI component as it is directly in-game:

OriginalUI.rbxm (16.0 KB)

1 Like

OK thanks for the additional info! I was able to repro the issue, but only for certain values of UIScale.Scale, like 1.39:


Does the text get cut off for you at every scale value, or only for certain values?
I suspect this is a rounding bug on our end, so I will reopen this ticket!

I suspect it is indeed only for specific UIScale values; we use UIScale objects in every UI component, and dynamically update the Scale value whenever the user resizes their viewport–so it is very rare that we have any UI that has a UIScale.Scale value of exactly 1.

1 Like