New property for Text: RelativeTextSize

It could be called something else, I’m bad at naming.

Basically, this would keep the texts actual size the same size relative to the TextBox, e.g.:

0, 100, 0, 00 box with font size 16 Text that takes up ( example, not real sizes ) 0, 16, 0, 30

When the box is resized to 0, 200, 0, 200 the text would take up 0, 32, 0, 60 but still be font size16 ( Increasing the font size would increase the font size relative to the box )

Related post in which I asked if there was a way to currently do this: http://devforum.roblox.com/t/any-way-to-make-text-scale-relative-to-the-size-of-the-textbox/32156/6

2 Likes

I don’t mean to be disapproving, but I liked the TextLabel within a frame approach that someone suggested on the other thread. It solves the problem without scripts and it’s pretty flexible, so would prefer encouraging that approach rather than making a new property.

I get that, but I’d personally use this feature for any text I make to keep it looking the same across all screen sizes, meaning a single property would be preferable.

Your suggestion actually gave me a good idea: MinTextSize and MaxTextSize for scaling so that the font doesn’t become too large or small

Documentation - Roblox Creator Hub this?

It’s going to be cool to see more of this stuff coming.

I sometimes uses BorderSizePixel to create some padding in my text elements, by keeping the border and background color the same. This doesn’t change the actual position or clickable area of the element, neither does it scale with different screen sizes for the padding, though - using textboxes as a hackaround can do with little code, that’s ROBLOX GUIs for you. Is it a good approach? Honestly, no - not compared to CSS and other UI styling methods. But I’d rather see GUI padding than a feature specifically for text areas - which by now seems niche.

If they just made HTML guis the world would be a better place, but unfortunately that’s not gonna happen :frowning:

1 Like

How did I never find that…