I want my text to scale to fit its container, but it is only one word. I do not want the single word to be wrapped over multiple lines, I simply want the text to become smaller so that the word fits on a single line.
Currently the only way to achieve this is to manually configure the TextSize with TextScaled off until TextFits is true, or, calculate the undocumented properties of different fonts and derive some formula.
I’d love to have this added. When I’m making UIs, I usually spent up to 25 minutes trying to make text scale without wrapping. It is an absolute pain to deal with every time I go to make a new UI.
I’ve always been puzzled as to why this feature wasn’t already in existance. Shouldn’t be ridiculously hard to implement, and would be useful to the community. Support.
It’d probably make sense to have a property to specify what axis the text scaling should be based on (i.e. fitting horizontally or vertically) Not sure if there’s many cases where it’s useful for dynamic text to scale to fit its container in both directions (which is too unpredictable stylewise), which seems to be what .TextScaled currently does
Text scaling is still a mess. Cutting words in half and splitting them in multiple lines should be treated as a bug because there is no way this is supposed to be intentional. It isn’t good UX and turning TextScaled off is not a viable option.
Support
The current behavior makes it unnecessarily difficult to properly make guis that scale well across platforms. This would be a real improvement to gui creation
The update you’re referring to shipped in October of last year. I’m planning on adding additional ways to set the size of text besides just setting the size in pixels, such as being able to set it to a Scale value. I don’t know when I’ll have time to do that though.
One “Solution” I found was to just set the line height to the max which is 3. this should word as long as the text item doesn’t have automatic scaling enabled, and the text item isn’t too vertically enlarged.