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

TextmeshproUGUI small fonts have bad aliasing in 2019 versions

Discussion in 'UGUI & TextMesh Pro' started by NimlokDigital, May 29, 2019.

  1. NimlokDigital

    NimlokDigital

    Joined:
    Jul 9, 2017
    Posts:
    7
    Having started a couple of new projects in 2019 using the latest version of Text Mesh Pro we are having bad aliasing issues on small(ish 20pt) fonts, which were not a problem in previous versions. (please see image attached)

    It almost looks as though the texture no longer has mip-maps applied. Having tried everything I can find on Google/the forums, I cannot seem to solve the issue. Has anyone else started having this issue?

    As a side note, lowering the texture atlas is not an option as we also have large fonts which look blurry when the texture is lowered. This was not a problem in the last version on 2018.
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of TextMesh Pro were you using before?

    Is your font asset using SDF or is this a bitmap font asset?

    Can you post an image of the Material Inspector with the Debug section expanded? I would like to verify the settings there as well as making sure the Atlas Texture resolution and padding match those of the font asset and atlas texture.
     
  3. NimlokDigital

    NimlokDigital

    Joined:
    Jul 9, 2017
    Posts:
    7
    I have been using 1.2.4 and 2.0.0 on 2018 and 2019 Looking at it, small fonts were an issue in 2.0.0, but I have been lucky enough to have projects that didn't have drastic changes in font size. (we work on lots of quick small projects here so things change often)

    I have tried both bitmap and distance field (I remember distance field working perfect in the old version), but I get this when using Distance field


    Screenshot (196).png Screenshot (197).png

    And this is the bitmap version

    Screenshot (198).png Screenshot (199).png


    As you can see, both have the extra padding tick box for the font which mitigates a small amount of the issue but not all of it.

    Below for reference is the settings I've tried for building the font asset where I get the best (but not ideal)

    Screenshot (201).png

    Any help will be greatly appreciated as currently my only option is create a font asset with a small texture size for small fonts and a large texture size for the large fonts which is not ideal at all.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Looks like you created a font asset that is bitmap but trying to use an SDF shader on it. Make sure the created font asset is either bitmap using the bitmap shader or SDF using a Distance Field shader.

    Please post the information contained in the Debug section of the Material Inspector. Also post an image of the font asset inspector too.

    Padding value of 20 is most likely excessive but I can't see what the sampling point size is.