Search Unity

TextMesh Pro Font Icon - Background Color on Small Font Sizes

Discussion in 'UGUI & TextMesh Pro' started by ERENKYI, Mar 23, 2018.

  1. ERENKYI

    ERENKYI

    Joined:
    Jun 1, 2017
    Posts:
    4
    I am using a font icon that I created using on fontello.com and in some cases, the icon characters (submesh UI object) gets a background color when I choose a smaller font size than 21px. Is there a solution for this?



    Edit: Apparently, creating a font with lower resolution fixes this. I converted 512x512 to 128x128 and it worked flawlessly.
     
    Last edited: Mar 23, 2018
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This is the result of the ratio of Sampling Point Size to Padding being too small. See FAQ Question 2 and 11.

    The short answer is you will need to regenerate the font asset and increase the padding value. You want to have the ratio between the two at about 10% or greater.

    For small text you might also want to enable Extra Padding in the text object inspector.
     
    robo-technology and ERENKYI like this.