Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug TMPRO displayed differently from Editor and iOS

Discussion in 'UGUI & TextMesh Pro' started by Developer1999-1, Mar 19, 2022.

  1. Developer1999-1

    Developer1999-1

    Joined:
    Oct 27, 2020
    Posts:
    33
    I tried to display the string "【DATA LOST】", where 【 is U+3010.

    In the editor, it is displayed correctly.
    upload_2022-3-19_16-20-38.png

    However, in iOS build, it is displayed as such.
    upload_2022-3-19_16-30-4.png
    Unity version is 2020.3.16f1, and TMP version is 3.0.6
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    The square glyph indicates the requested character is missing.

    Since you are getting this glyph to display in the Editor but not in your iOS build, it likely means that your primary font asset does not contain this character and that it is coming from some fallback font asset which may not be included in your build.

    To figure out what is going on, take a look at your primary font asset character and glyph table to see if \u3010 is present in there. If it is not, check the text object which should be using a sub text object. The name of this sub text object will let you know from which fallback this character and glyph is coming from. Then check if / why this font asset might not be included in your build.

    Let me know if the above ends up being the case. If not, we can dig deeper into this to figure out why the glyph is not being disaplyed.
     
  3. Developer1999-1

    Developer1999-1

    Joined:
    Oct 27, 2020
    Posts:
    33
    Thank you Stephan for replying.

    You are correct, the character is coming for a Traditional Chinese fallback font asset as such:
    upload_2022-3-21_3-54-8.png

    GeneralTextFont itself is a dynamic English Font, and TC_TextFont2 and JC_TextFont are both dynamic font asset for Traditional Chinese and Japanese. I am pretty sure that both TC_TextFont2 and JC_TextFont are included in the build properly, as most Traditional Chinese characters and Japanese characters are displayed correctly in-game.