Search Unity

Japanese & Chinese characters not showing in dropdown labels, but works fine everywhere else.

Discussion in 'UGUI & TextMesh Pro' started by mrCharli3, Jul 24, 2019.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    I added Fallback fonts to all my TMP assets, and it's worked great so far, being able to use Japanese and Chienese without any issues.

    However, when using a drop down, when I try to add Japanese or Chinese to the Label, or the dropdown list content, all I get are squares, like I did before I added fallback fonts.

    Is this a known issue or am I doing something wrong? literally just adding my font as I would to any label in my game. But the TMP SubMeshUI is not created as it is for other components.

    EDIT: I am ofc using TMP Dropdowns, version 1.3.0
     
    Last edited: Jul 24, 2019
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I'll try taking a look later today.
     
    mrCharli3 likes this.
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Any updates on this? :)
     
  4. Apfelmusbaum

    Apfelmusbaum

    Joined:
    Apr 26, 2015
    Posts:
    3
    Try making the font size smaller, I had a similar problem with regular Dropdowns where I replaced the labels with a TextMeshPro one, and these were not rendered if the font size was to large. Making the size of the item itself (in the hierarchy under DropDown/Template/Viewport/Content) bigger might also help.
     
  5. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Already tried this =/ Like I said, it gets replaced by square icons.
     
  6. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Anything? Would love to release my game with proper translations everywhere. Currently only dropdowns that do not work.
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    I totally missed the fact that you are using version 1.3.0 and not the newer version with dynamic support.

    Testing right now with version 1.3.0 with some fallback to see if the characters from the fallback get picked up correctly.

    Update
    Just tested in Unity 2018.4 with version 1.3.0 and 1.4.1 and it worked as expected.

    For testing I simply created two new font assets. The primary with the ASCII set and the 2nd with a few Japanese characters. I assigned the fallback to the primary and then assigned this primary to both the label and template item label child. I then modified the Options on the drop down to use Japanese characters and everything rendered correctly.

    I also tested removing the assigned fallback and got the squares and then re-assigning it, made those Japanese characters re-appear.

    If none of the above points to anything that might be different in your case, please provide me a repro project and I will be more than happy to take a look to see if I can figure out why you are getting the missing glyphs.
     
    Last edited: Aug 1, 2019
    scryedzxp likes this.
  8. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    976
    Great, thanks for helping. I will do another test run when Im get home and get back to you.
     
  9. xiao_peng_cheng

    xiao_peng_cheng

    Joined:
    Jun 2, 2018
    Posts:
    1
    I still have this problem on unity 2020.3.4, the tmp is 3.0.6, my font's resolution is 4096*4096
     
  10. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    The square is the missing glyph character which indicates the requested character and glyph is missing from the font asset.

    It is possible those missing characters and glyphs are present in the font file but missing from your font asset itself.

    I would suggest creating a dynamic font asset using this same font to see if those requested characters will show up.

    Let me know the outcome and if the characters and glyphs still do not show up, please provide me with a link to the font file and list of missing characters and I can verify if they are present or not in this font file.
     
  11. scryedzxp

    scryedzxp

    Joined:
    May 14, 2013
    Posts:
    47
    I was seeing the same issue as OP where I was getting the following issue for the template item even though I had assigned fallbacks to the primary:

    upload_2023-6-30_21-49-37.png

    Only after reading this:


    did I realize I had to drill all the way down in the hierarchy of the dropdown object and assign the font asset there as well:

    upload_2023-6-30_21-53-5.png


    Issue resolved:
    upload_2023-6-30_21-54-19.png