Text shadow: glitchy artifacts and cutoffs (2021.2b16)

I’m enthused that the team has gotten text shadows working, and generally, they look pretty great. However, there are some strange artifacts especially when combined with text outline:

7569676--937255--upload_2021-10-13_11-1-8.png

There are some weird black triangles and the end is cut off sharply instead of overflowing outside the label, It also seems the bottom is cut off, it should go down a few more pixels:

7569676--937258--upload_2021-10-13_11-2-23.png

Here are the styles affecting it:

-unity-font-definition: url('../text/Resources/TextCore/ComicShark.asset');
-unity-text-outline-width: 3px;
-unity-font-style: bold;
color: rgb(255, 255, 255);
-unity-text-outline-color: rgb(0, 0, 0);
text-shadow: 8px 8px 0 rgb(0, 0, 0);
font-size: 55px;

EDIT: Actually, the more I look it seems like the shadow is being constrainted to the glyph rect. See right side of the “N” where it is cut off as well.

Hi @burningmime !

Text-Shadow being constraned to the text rect is a known issue. The text geometry is not updated after adding the text effect, resulting in clipping when they overflow the text rect.

As for the artifacts, it’s the first time I have seen this. Could you try to increase the sampling to padding ratio in the FontAsset ?
It still looks like a bug to me, so could you report the bug through the Unity bug reporter (Help/report a bug…)

Thanks for bringing this up!

1 Like

Thank you!

Yup; the problem was I had too low padding on the generated texture. Default padding was 9, increasing it to 12 resolved the issue. Do you still want me to report it as a bug?