Localized Text Doesn't Update TextBounds

Howdy, I’m trying to localize my game but I’m running into a pretty frustrating bug. When something like a TextLabel or TextButton has localized text, it still has the TextBounds of the original text. TextBounds is a property that basically states how much space the text takes up.

This is a problem if you have a script that positions gui objects based on TextBounds, such as my inventory for Azure Mines:

Screenshot_66

Or for example you size TextLabels based on TextSize to create a background like this:

image

2 Likes

I came across this when messing around with the localization feature, it’s a really annoying bug. I believe it may be the same reason that this happens: LocalizationService "Duplicate Locale Column “” " Error

If that’s the reason it happens, because of the bounds not updating to respect the localized text then I guess hope that the TextBounds will be updated to respect localized text. @ContextLost has inquired about whether there is anything they can do to address the issue mentioned, maybe he could give us an update? I assume this is the reason that it happens.

1 Like

Yeah this is definitely a bug.

I think this will be fixed whenever @Tiffblocks can enable her text layout rewrite, but she’ll have to confirm.

1 Like

It will be, but we may want to ship a fix in the mean time.

2 Likes

I also noticed that when using Instance.new to make a text label, you need to parent it with text applied as well before you can use the Textbounds because it doesn’t update with the size of the text while its not parented to anything apparently.

I am having this same problem only with my money gui. I want it to slide from the side of the screen and slide out just enough to fit the text. Have you found a way around this yet? If so I would love to know how