Really, really small fonts for in-scene text. Not possible?

I m making a game using real world scale and during my character selection phase I want to show some stats in a 3D view behind the character. I’ll post a screenshot of the “Buy character” screen below to give you an example of what I mean.

The thing is, I can’t seem to get fonts that small… I remember Unity showing us how text can be displayed in-game to show what is going on on a PC terminal and that is basically the exact behavior I am after but I just can’t seem to make text that small…

On my normal, full screen GUI where I do all the rest of my GUI stuff, there I use a Dynamic font set to 16 and it works great. When I try to do the same with the other canvas, not so much…

If I set the text to 16 it is larger than the entire scene. When I set it to 1 all I see is a blur. So then I change the font type from dynamic to fixed and then it works just fine but if I import the font into Unity at 16 then use it at size 1 in the scene, again all I get is a blur… The higher I set the font size on import the better the RESOLUTION of the font in the scene. I seem to get best results with an import size of 90. That gives me clear text that is actually readable, not just a blur…

However, if I set the font size to 1 on the Text component, Each letter is the size of my character’s head and larger values behave accordingly. Even the smallest of words are larger than my entire Panel and cause the text to be written one character on a line but it all starts UNDER the terrain and is nowhere NEAR visible in my scene.

Eventually I had to resort to faking the text by making images in Photoshop and now I need to fake the buttons because I can’t show the text in the graphic and then load a button on top as that will hide the text and again force me to use the fonts that I can’t see to get small enough to be usable…

So, does anyone have any ideas how I can use Unity UI to do in-game text at a small scale?

Thanks

When I use a world space canvas, I usually set the resolution fairly high, like 800x600+. Then I scale the canvas down to size, like (0.01, 0.01, 0.01). With dynamic fonts, this usually produces fairly crisp text even when scaled down. Does that make any difference in your scene?

To get even crisper text, I’ll use TextMesh Pro, which works great with Unity UI.

5 Likes

@TonyLi 's suggestion is correct. Since the Text system is still the legacy one, you need to make really big text on a large canvas or group empty GameObject and then scale it down to the small size you want for placement. This uses the renderer scaler rather than the font system and gives you better quality.

Or (as TonyLi says) use TextMeshPro which is also excellent :smile:

1 Like

scaling down the canvas gave me no visible results but scaling down the group object to 0.01, that resulted in exactly what I needed, thanks. but man, the text looks bad. No wonder you are recommending that other kit… Thanks for the tip.

I tried to hard to keep everything at 1,1,1 scale and modify the delta size of objects instead. I never imagined I would ever be working with 0,01 scaled objects… but hey, if it works it works, right? :smile:

1 Like