Search Unity

Unity UI UI Text not showing unicode character on iOS

Discussion in 'UGUI & TextMesh Pro' started by triple_why, Apr 7, 2020.

  1. triple_why

    triple_why

    Joined:
    Jun 9, 2018
    Posts:
    47
    Hello,

    I have a UI Text component, having ↧ character as text string. It uses "NotoSansSymbols-Regular" font, which has ↧ character at U+21A7.

    upload_2020-4-7_21-51-19.png

    At font import settings, character is dynamic and incl. font data is selected.

    upload_2020-4-7_21-51-56.png

    On editor and Android, the character is shown properly. But on iOS, a question mark is shown instead of the character.

    upload_2020-4-7_21-58-39.png

    I can convert the character to an image, since this is the only usage of a unicode symbol character. But just out of curiosity, I wanted to ask why. Does anyone has any idea about the cause or solution?

    Thanks,
    Yasar
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The Legacy text system which UI Text uses will search some of the system fonts to look for that missing character but in the event if can't find it, the missing character known as .notdef / glyph index=0 will be displayed. On Android, which includes the NotoSans font family, the system is able to find this U+21A7 character. However, on iOS which includes a different set of fonts, it appears this glyph is not available.

    This also means this character is not present in this NotoSans Symbol-Regular font file. You could include a different font file with your project that includes it.
     
  3. triple_why

    triple_why

    Joined:
    Jun 9, 2018
    Posts:
    47
    Thank you Stephan,

    Yes, I mistakenly thought that NotoSans Symbol font has that character, because character was showing at Notepad++ when NotoSans Symbol is selected, while not showing when NotoSans is selected. But when I check now with Character Map tool of Windows, I see neither of these fonts has the character.

    So, checks shouldn't be done with Notepad++ but with Character Map tool ^^