Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Moving TM Pro and reimport it creates artefacts on fonts

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by -Aymeric-, May 23, 2019.

  1. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    101
    Hey,

    In my project everything was fine with TextMesh Pro texts. We reorganized Assets folder structure, removing plugins and adding them back (so they're imported at their correct/default location) and it's braken our fonts (see screenshot).

    The problem doesn't appear in Scene only in Game view. We recreate fonts with the same parameters and override fonts files, we still have the problem.

    Any ideas? We're using Unity 2019.1.3.
    Thanks.
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,758
    Can you provide me with the font asset?

    Please include the source font file and the font asset.
     
  3. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    101
    Thanks for the answer @Stephan_B, please find one in attachements.
     

    Attached Files:

  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,758
    Looking at your font asset, the Sampling Point Size is 218 and the Padding 5 for a ratio of Sampling Point Size to Padding of 2% which will cause those visual artifacts. See FAQ Question #2 about this.

    Typically, you want to aim for a Ratio of about 10% which will give you a good effective range on material properties like Dilation, Outline, Underlay, etc.

    Furthermore, a Sampling Point Size of 200 is a bit excessive (unless you specifically needed something like that). Most of the time a Sampling Point Size between 48 and 100 is good where I usually go for about 90 with padding of 9. Reducing the sampling point size will also reduce texture space which is always a good thing to fit as many characters.

    In terms of why the issue was not visible before, that is uncertain. For that, take a look at your previous font asset before the re-shuffle / changes and you might discover the sampling point size to padding ratio was close to that 10%. Let me know what the previous values were before so we can know for certain this was the issue.

    upload_2019-5-24_1-17-46.png
     
  5. -Aymeric-

    -Aymeric-

    Joined:
    Oct 21, 2014
    Posts:
    101
    Thanks for the explanation about the Point Size and the Padding! I regenerate the fonts with a smaller size and it works fine.

    I double checked my git, and fonts assets never changed during this project restructuration. So don't know what happened.