Search Unity

Bug Strange issues with multiple fonts atlases (localized) and SubMeshUI

Discussion in 'UGUI & TextMesh Pro' started by daxiongmao, Apr 28, 2023.

  1. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    I have a text field where characters names are displayed.
    When the character name is using say all english glyphs then the auto size and alignment work correctly.

    But one of our characters has a mix of english and simplified chinese characters.
    In this case the autosize makes the text much smaller than say the same english characters.
    20pt vs 28pt.

    The other weird thing is the vertical alignment.
    When it is set to auto size it has no effect.
    If disable auto size and set a fixed font size. Then it is reversed. Top is bottom, bottom is top.

    The example is Wěi. While not exactly a chinese character its a pinyin version. The ě glyphs is in NotoSansSC-Regular font.
    And the remaining glyphs are in Exo2 font.

    Even setting the text to only be from the NotoSansSC it still behaves strangely. Moving the text outside the margins and auto size does not change.

    I found checking all caps or small caps seems to make the text match better in size as well and the alignment behaves correctly too.

    upload_2023-4-28_16-52-33.png

    I am assuming maybe its how the other font is setup.
    I have included pictures of the two fonts assets.

    upload_2023-4-28_16-54-24.png

    upload_2023-4-28_16-55-11.png

    Here are the glyph and characters from the font.
    The ě is in the character table. But searching in the glyphs it does not come up.
    But it is there when not searching.
    upload_2023-4-28_17-3-19.png
     

    Attached Files: