Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

[Solved!] "Best fit" functionality

A topic by eximarus created Sep 05, 2017 Views: 478 Replies: 2
Viewing posts 1 to 3
(1 edit)


In Unity there is the "Best Fit" functionality on text components which allows  automatic font size scaling based on how much space is left in the ui element. Does this also exist in super text mesh?

Developer (1 edit)


This is a feature I've been meaning to add for some time, but haven't added it yet as it's not really needed for STM's main usage.

If you're using STM for dialogue text, this wouldn't be needed as having differently-sized text appear between boxes would look bad.

And if you're using STM for a static text element, you'd be able to tweak the size yourself, to a better degree of accuracy. (Since text quality/point size and size are independent of each other, this is easy)

The only time it'd be useful is for static text elements that change what they say between different languages or something like that? But even then, very long words/phrases could look weird.  So I think I might be add it as an additional component that sets the size element automatically if it's needed?

size = maxX / AutoWrap or something might do it, this is just a note for myself when I come back to it later


Okay this feature is in for the next update! I should have done this faster, but I was afraid of how using best fit on multi-line text would work, but it works great!

There's now 3 options for best fit... 

"Off" (which is just how STm behaved before, no changes)

"Always" which will always make text be as wide as the autowrap limit.

and "Over Limit" which will make text fit within the autowrap limit, but only shrink it to fit, not enlarge it to fit.