How to scale your preferred TextSize from a mobile device

This is a reply to an old post but extended.

If you want the TextSize to scale but using your own preferred TextSize then…

Here’s one way to do it, have the entire UI done on a device preferably S7 or iPhone 7. Make sure the Objects are inside a single Frame, and that it has an aspect ratio that scales proportionally. (You shouldn’t need UIAspectRatio but just in case.)

Here is a plugin that lets you add proportional UIAspectRatio quickly. Just select a Gui and press on the “Add constraint” underneath Plugins. Credible source

Then, increase the size of the Text based on the Frames size. For example if the original absolute x size of Frame is 412 on an S7 and its new absolute x size on a PC is 1200 just do 1200 / 412 to get how much it increased by and then multiply that to your text size.

S7XOffset = 412
PC = 1200

1200 / 412 = 2.912..

GuiObject.TextSize = math.floor((child.TextSize * Multiplier) + 0.5)
-- or if you don't want to round it
GuiObject.TextSize *= Multiplier

Original
Capture by Bryan Varsitelle, on Flickr

Using this method
Capture1 by Bryan Varsitelle, on Flickr

Using TextScaled
Capture2 by Bryan Varsitelle, on Flickr

You can see that there’s a little bit of padding with the “Too dark” and “Too bright” so that it doesn’t look cramped. You could use UIPadding instead but this method is a shortcut to cut time easier.

Note: I didn’t set a presentable TextSize for “Its alright” button, so it’ll look a little odd.

2 Likes

Do you think is better than simply using a UIScale? This can be achieved by disabling TextScaled and using a static text size instead.

No, I don’t think this is better than parenting a UIScale to a ScreenGui to control the TextSize without having to go through backdoors. I made this tutorial without fully knowing UIScale as its still a new thing to me, and to give a direct solution all in one web page seeing as how there was no definite answer to the question.

I’ve had to dig through at least 3 forum web pages on scaling a TextSize but none of them gave a definite answer nor a hint to UIScale so I came up with my own that others can find easily.