Resizing text for centered counter but not go crazy

I’ve always wondered how such functionality isn’t build-in as I see it everywhere but I guess it’s not for every kind of text as it’s dynamic. Basically I want to get the same result as in this video:

I want it anchored so it’s not jumpy like any centered option

Currently I have this: Dropbox - File Deleted - Simplify your life

Is it justified but the width of the text area changes depending on the length of the characters?

When using non-monospaced the width of individual characters changes. As such when the text alignment is Right, Center or Justified, the position of the text will change slightly.

Using a monospaced font would solve that since each digit (in this example) would have the same width / metrics.

Alternatively, you could manually adjust the metrics of those digits in the Font Asset Inspector. If you edit the Advance value for each digit to be the same, then it will be stable. I think the sprite / currency won’t need adjustment.

You could also play with the <mspace=x.xx> tag.

1 Like