1
\$\begingroup\$

I've been struggling with the text for my game labels, as can be seen below. Unity has even included it as an official bug, although no timeline is set to fix it.

enter image description here

The text just looks poor. I've seen artifacts too, like this one:

enter image description here

Looking around the internet, the suggestion seems to be buy Text Mesh Pro, currently on sale for $69.50. While it's not completely out of possibilities I have, I'd rather not pay so much for a tool that has uses far beyond what I need. All I really want is a UI Text that looks reasonable!

My questions are these:

  1. Will Text Mesh Pro work as a drop in replacement for world space UI.Text?
  2. Are there any other options out there to improve the text quality?
\$\endgroup\$
2
  • \$\begingroup\$ You can usually improve font quality by using a larger font-size and a smaller scale for the text object. \$\endgroup\$
    – Philipp
    Dec 1, 2016 at 14:52
  • \$\begingroup\$ @Philipp I've toyed with that, it seems to show AA artifacts that look quite poorly at low resolution. \$\endgroup\$ Dec 1, 2016 at 15:24

3 Answers 3

2
\$\begingroup\$

I found these settings to make my world space text look crisp.

Set the Dynamic Pixels Per Unit on the canvas scaler to 1.

Set the Reference Pixels Per Unity on the canvas scaler to 100.

Use a font size of >230 for the actual text component. And also for good measure set the font rendering mode to Smooth.

\$\endgroup\$
0
\$\begingroup\$

I used a PPU of 1. In the UI gameObject I set PixelPefect to true. Check your display preferences for no anti-alias. Also on the imported font I used the same font size as the setting UI Text.

See if these can help

\$\endgroup\$
0
\$\begingroup\$

In reference to other answers, setting a font to Dynamic means that it will recalculate its atlas every time the text to be displayed changes. If it happens often (score, timer, counter, etc.), it might be a problem. Also setting the size to be huge might result in a huge atlas.

The image you posted looks like you have a UI.Text with an Outline attached to it. If that's the case, Outline will never look good (anti-aliasing bug or not). It is just the algorithm that they use (copy the text mesh and give it an offset). Actually, I would recommend never to use it with offset larger than 1, but I guess it depends on the font you are using as well.

That being said, it looks like your game is 2D from the look of the image you posted? In that case you don't need the anti-aliasing anyway as it only applies to 3d meshes. In 2d, the sprite transparency is used for the same role.

About TextMesh Pro: is not a drop-in replacement for UI.Text. You will need to change any script that references UI.Text to TMPro.TextMeshProUGUI, but there's nothing else to do.

TMPro is also usable in your general UI. And their text is very crisp. I've been using the asset for a year, it is very professionally made and it is well worth the money.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .