Search Unity

SDF render issues

Discussion in 'UGUI & TextMesh Pro' started by gjf, Sep 16, 2020.

  1. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    I'm trying to add a fallback font (containing additional glyphs - Hebrew, in this case), and whilst it works for some font sizes, when the rendered graphics get below a certain size, there's a distinct issue where it seems like the alpha is no longer transparent.

    It's easy to replicate by downloading the Noto Sans Hebrew font and creating a font asset (everything I'm doing has a known character list) - then changing the font size of any text. Everything works as expected if I created the asset from Liberations Sans, but I'd prefer to keep the same font family.

    Everything works for many European languages and Japanese, Chinese, etc., but adding Hebrew from the same font family creates the issue.

    Any suggestions?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Most likely the issue is related to the Ratio of Sampling Point Size to Padding being too small. There are several posts about this on the forum. Here is one such post.

    The solution is to update / regenerate the font asset to use a larger ratio of sampling point size to padding.

    Note: In order to ensure, material properties such as Dilation, Outline, Underlay Offset, etc. is consistent between Primary font assets and fallbacks. The same Ratio of Sampling Point to Padding should be used between those font assets. For instance, if the primary has a sampling point size of 90 with padding of 9 for a ratio of 10% then the fallback could be using the same values or anything else that also results in a 10% ratio such as sampling point size of 60 with padding of 6. As long as the ratio is the same, the rendering of those material properties will be consistent.
     
    gjf likes this.
  3. gjf

    gjf

    Joined:
    Feb 8, 2012
    Posts:
    53
    Thanks for the quick response @Stephan_B - I'll give that a try.


    EDIT: That was exactly the problem. Thanks again!
     
    Last edited: Sep 16, 2020