Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Why does my imported font have gray boxes around the letters?

Discussion in 'UGUI & TextMesh Pro' started by Snubber, Nov 29, 2021.

  1. Snubber

    Snubber

    Joined:
    Jan 20, 2020
    Posts:
    65
    This is a font that I downloaded from Google Fonts and tried importing with TMP. I get light gray boxes around all of the letters and I can't figure out why. (see the attached image)
    Here are the associated settings:

    upload_2021-11-29_8-48-29.png upload_2021-11-29_8-47-3.png
    upload_2021-11-29_8-48-52.png
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This is due to the Sampling Point Size (165) to Padding (6) ratio being too small for the material property values you are using.

    The solution is to update the font asset to increase this ratio. A good starting value is like 10%. See the following FAQ Question 2 and 10 from this sticky thread and post for more details.

    P.S. A sampling point size of 165 is pretty large and may not be necessary. I would suggest using the default Sampling Point Size of 90 with Padding of 9 for a Ratio of 10%.