Bump, I’m surprised that this has been in the backlog for nearly 8 years now.
bump; again and again and again
sorry gng we’ve been lied to again
That’s not a good idea because it changes on different displays and that would require scripting to fix.
Just alter the TextSize property on TextLabels and TextButtons to use UDim for Pixel and Scaled values based on parent height.
Bump. I cannot replicate this feature at all with the current tools. As others have mentioned, this is essential for UIs. I have tried AutomaticSize, UITextSizeConstraint, just to name a few, to no avail.
So the problem seems to be that if your text object can grow infinitely it’ll always just choose the largest font and the constraint seems to have no effect.
It can even make the text go off screen.
I made a double frame setup, where the outer ContentsY frame is limited to the screen size itself with some padding. Anchor point (0.5, 0.5) Size scale (0.9, 0.9)
I made an inner ContentsX frame with size scale (1.0, 0.0) and anchor point (0.5, 0.5)
I added a list layout object to lay some text out vertically.
Each text object has auto size set to None. The list layout makes them automatically take the full width of the container, but the height is set to something like scale(0.0, 0.2)
This allows the text objects to shrink and grow for different device resolutions but also prevents them from going off screen by growing vertically infinitely.
This served my purpose for an internal demo app.
I can see it being useful to add something similar to Unreal’s DPI scaling. Maybe in the form of a constraint. Otherwise I’ve seen people do this in script which means you don’t get in editor preview, but at least at runtime it has good results.
https://dev.epicgames.com/documentation/en-us/unreal-engine/dpi-scaling-in-unreal-engine
This is in Roblox with a script that does something similar.
This would essentially let you design your UI for some base screen resolution, and the font or UI element/container sizes will scale up or down depending on the real resolution. Then you don’t have a problem of the UITextSize constraint always just choosing the biggest text size in an infinitely growing container. You could work with absolute offset units instead of scale, and the offsets/font sizes can autoscale.
Would like to mention that plugins like Hoarcekat do solve this issue
Hello, would it be possible for us to access the demo of this? I tried to follow along your description, but a few parts are unclear to me. Also, I think a simple solution to this problem we’re all facing would be more customization into how text is scaled in our labels, like a “scale percentage property” that specifies the percent of the width and height of the label that should be used to determine the text scale.
I don’t know of anything like this being built yet.
I think the best bet is to use custom scripts for now.
You know this has an incredibly simple solution that would take seconds to implement on roblox’s end. Simply add an extra Udim2 value to Text frames called TextScaledRowSize. All that it would do is instead of use the frame itself as a point of reference for scaling the text, it would use the absolute size of this Udim2 as if it were a child of the GuiObject, and importantly, it would consider this size only when determining a single row of text scaled.
This means that I could set TextScaledRowSize to Udim2.fromScale(1, .4) and essentially each row of text would occupy 40% of the Y size, and write as far as the X axis allows.
This not only allows for the immediate handling of the problem described in this post, but it also removes the annoying need for TextLabels with TextScaled placed inside of TextButtons, you could finally actually use the TextButton’s text property
bumping this cause its been a while and no major updates other than someone saying to just script it
70th bump of this posts life time.
It simply cannot take this long to have a built-in property or constraint for text labels that scales text with the frame size. It’s such a generic feature, it should’ve been shipped along with text labels themselves.
