Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How do I fix this weird jagged outline on my TM pro text?

Discussion in 'UGUI & TextMesh Pro' started by imaginereadingthis, Aug 2, 2022.

  1. imaginereadingthis

    imaginereadingthis

    Joined:
    Jul 25, 2020
    Posts:
    97
    Hey everyone,

    I am using the official Roboto Regular font from Google Fonts, so I don't think this has anything to do with the font. I attached two images below showing the problem:

    upload_2022-8-1_23-7-33.png
    upload_2022-8-1_23-13-31.png

    In one of them, I have the Dilate and Outline options enabled, which only makes it a lot more noticeable. But even without those two options, there are still irregular bits in the text. I was wondering if there's a way to fix this completely and make the text smooth.
     
  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    578
    This is more or less result of how TextmeshPro SDF rendering works. With bitmap fonts when scaling them they either get pixelated or blurry depending on setup, while SDF allows you to scale them further while staying sharp but there will still be defects. The defects from excessive scaling look different than with other font rendering techniques but they are still there.

    You can mitigate this problem by increasing "Sampling point size" in TMP font asset config but that will also increase VRAM usage so do it within reason. Only for the fonts that you are going to render that big. Don't stress too much about it if it's only visible while zooming in using Unity Editor beyond what they player will be able to see during normal gameplay.
     
    imaginereadingthis likes this.
  3. imaginereadingthis

    imaginereadingthis

    Joined:
    Jul 25, 2020
    Posts:
    97
    Thank you for the insight!