Font Awesome rendering bug?

Hi,

I’m seeing a strange behavior when using Font Awesome in Unity. Take a look at this video to see the bug:

If you are zoomed in, there icon looks like expected. But if you zoom out and it gets smaller, it looks like something is overlaying it. That is also the thing you will see in play mode.

I basically followed this guide to get Font Awesome into Unity: How can I show icons of Font Awesome into Unity using TextMesh Pro? - Questions & Answers - Unity Discussions

My Unity Version is 2019.3.0f6

Do you have any idea, what is happening here? I’d love to use the Font Awesome Icons via a font instead of grabing images or rendering SVG.

Short answer: Sampling Point Size to Padding ratio is too small.

Longer answer:

2. I see visual artifacts around the edges of characters. How do I get rid of them?
These artifacts can be caused by material properties like Dilation, Outline, Underlay, etc. As these property values get near their maximum range, parts of adjacent characters in the font atlas texture can bleed into each other. The font Asset Creator inserts padding between characters to prevent this from happening. To make these visual artifacts go away, re-create the Font Asset with a larger padding value. Note that the padding value affects the range of those properties but also affects the sampling quality of the Font Asset. See this topic for more details. See the following updated video about Font Asset Creation which provides information about padding and how it affects material properties and their range.

Related to this …
11. How can I increase the range of text effects like dilation, outline, and underlay?
The range of these effects is determined by the padding used when creating the font atlas. The larger the padding, the larger the effect range. Of course more padding means less room for character data. So there is a trade-off between character quality and effect range. Use the smallest padding that works for you. Note that the padding is specified in pixels, so if you double the texture size you also have to double the padding to keep the same range. See here and here for more details. See the following updated video about Font Asset Creation which provides information about padding and how it affects material properties and their range.

1 Like

@Stephan_B Awesome! That solved it. I had a padding 5 and the auto sampling resulted in ~ 2300. I changed the sampling to 100 and everyhing looks fine.

I guess in the original post that is not an issue, because a lot more glyphes are selected reducing the auto sampling size and the issue is not showing up.

Thanks!