Text Box Text Sizing Issue

Been having some tough problems lately with my UI. ( not surprised )

Basically ( as shown in the VGA screen ) I want my “Codes” Text Box’s text size to be the same for all screens.

This is how it looks on 1080:
image

Tried using a TextSizeConstraint ( but it didn’t work obviously )
Can someone give me some help?

1 Like

maybe set TextScaled in properties menu to true?

1 Like

I did, but it looks wayyy too oversized.
image
( this is in HD )

1 Like

Realistically, in this day and age, you shouldn’t be expecting anyone to be playing your game on a 4:3 display that only goes to 640x480.

I’d just keep it as-is, maybe increase the size. For general reference, I recommend using the display emulation sizes of 1366x768, 1600x900, and 1920x1080.

But I’m not so sure about what you should do if you plan on having mobile users as well.

1 Like

My computer’s size isn’t big… That’s why I use VGA…

The problem is that the Text Size is never the same on any device, even when I try to fix it.

This is more shallow thinking.

1, You should be thinking about other users and the common devices/screen resolutions used, not about your own device, from which I gather from your text, is really unconventional and is perhaps unfit for this type of stuff. Sure, phone screens may be small, but they still follow a near 16:9 ratio, and tablets have a large enough resolution that using 720p emulation could work fine.

2, Of course the text won’t be the same on every device, that’s not how it works, your best bet would be TextScaled, though it may look more awkward, you can depend on it being more readable on most devices than having a set text size. If you insist that TextScaled makes it too big, try making the TextBox smaller or something.

With TextScaled off, you may have trouble making the GUI look good on phones, but that’s what the phone selections in the emulator are for.
With TextScaled on, you’ll have much better chances at the GUI being more readable on all screen sizes, sure it may not look appealing, but compromises must be made sometimes for the sake of functionality.

2 Likes

Apologies for the device situation.

I don’t try to make it sound like I do not care about the player-base ( aka the users ). It’s just that it’s difficult to test UI with a small screen lol.

I don’t really have a list of Devices that support Roblox, so I can’t really find a specific size that would “look good for most of them”.
What I wanted to try is find a way to make the text’s size be as close as possible to every device. Guess as you pointed out, TextScaled will help.

Place a UIPadding under the TextLabel you’re trying to resize. Changing the UIPadding thats a child under the TextLabel will help make the text fit better into the frame using the scale or offset (pixels) property. Super useful for working with Text within frames without being too big or clipping the parented borders.

You can read about UIPadding here.

2 Likes

Would it be the same if it was a TextBox? ( as that is what I am trying to fix )

1 Like

Works with any Gui instance with a size property. TextLabels, Frames, Buttons, ImageLabels ect.

1 Like

Use RichText in the text label’s property. Rich text removes the 100 text size limit