Search Unity

Bug Are dynamic font atlases actually dynamic in builds? And do they work with fallback fonts?

Discussion in 'UGUI & TextMesh Pro' started by Peeling, Feb 27, 2024.

  1. Peeling


    Nov 10, 2013
    Reason I ask is, we've got a couple of fonts set to 'dynamic', and we're getting the following behaviour:

    1. Anything in the pre-baked list works in a build.
    2. Any non-pre-baked character I put into a TMP_Text in the editor shows up fine and then also shows up fine in the next build.
    3. Any non-pre-baked character I haven't put into a TMP_Text in the editor prior to the build does not show up in the build and instead we get a character from the fallback font - which is also set to dynamic and also didn't have the character pre-baked.

    It's as though the dynamic font works properly in the editor, but in a build, TMPro does this:

    1. Is the character in the primary font?
    2. No : is it in the fallback font?
    3. No : is the fallback font dynamic?
    4. Yes: render the character to the fallback font atlas.

    Whereas really it should try to render the character to the primary font, and only use the fallback font if the character doesn't exist at all in the primary font.
    xucian and nb_pg like this.