New text-rendering property: TextSquished

There are a couple ways to make text more compact to fit a certain amount of space (TextWrapped, TextTruncate, and TextScaled), but at the current moment, particular user interfaces cannot be satisfied by any of the current options, coming from a design standpoint. As a Roblox developer, it is currently impossible to make on-screen text that will squish to make itself more compact.

There are many reasons why squishing text is sometimes the most logical option over the other choices. For example, some UIs need text that is only one line, and so TextWrapped is out of the question. Not every UI can have the freedom of vertical space.

Scaling down text can sometimes make it illegible.

Here’s an example of text that would be shown in my word game. The word that has been used appears under the player and sometimes gets too long and cuts into the other players on the screen.

example1

Currently, the only solution to this problem is using the TextScaled property to keep the text within the bounds of the GuiObject, but what that actually does is make the text almost impossible to read, and removes the consistency, where every other word was the same size vertically but this one was changed, which is horrible design. (Keep in mind: using TextTruncate is not an option since the other players need to know what word was played, or at least the word length when it the word is filtered occasionally.)

example2

For best legibility of the word, it needs to be squished, like seen in the following edited example.

example3

Here is another image that shows another place where having squished text would be optimal, from the Overwatch League. Imagine if this text was truncated or scaled down instead, it wouldn’t be a good design choice.

So, I have a couple of ideas for new properties that could be added to solve this:

  • TextSquish (number, default: 0)
    Determines how much the text is horizontally squished

  • TextSquishAuto (boolean)
    Determines whether text should automatically set TextSquish to fit within its horizontal boundary

Addressing this problem would help developers on Roblox create a better experience for their players, while also improving design if used in the right places and the right times.

31 Likes

I’m interested in this feature request.

A usage I need is for road signs, or displaying the street you are on in a city/racing game at the top of your screen. Note their same height but with changed horizontal squish.
image

Another usage I need is a dynamic list of player names with wildly varying lengths (such as an end-of-round list of participants), and trying to fit them all to a horizontal width of a list frame, without truncating or making illegible.

I was unable to squish the text horizontally with CanvasGroup:
image

You are technically able to squish text horizontally with SurfaceGui size not matching its part face size, but I do not wish to use a part SurfaceGui as 2D UI screen text.

2 Likes