Search Unity

Resolved TextMeshPro Fallback Produces Weird Line Breaks

Discussion in 'UGUI & TextMesh Pro' started by ADaurio, Jul 17, 2021.

  1. ADaurio

    ADaurio

    Joined:
    Jul 12, 2015
    Posts:
    21
    Hey everybody!

    I've got a weird issue with localized fonts in TextMeshPro that I'm hoping somebody can help me with. It looks like rich text and arabic numerals are causing TMP to trigger fallbacks, but each fallback makes a separate submesh and layers on top of each other in unexpected ways. It also looks like it wipes out alignment in some cases. I've attached some images of the text in the component and the result.

    If anybody has any thoughts, please share! Localization with TextMeshPro is pretty new to me, so I'm curious if I'm just missing something obvious.
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Looks like the text / string may contain hidden characters like carriage returns <CR> char(13).
     
  3. ADaurio

    ADaurio

    Joined:
    Jul 12, 2015
    Posts:
    21
    Aha! You're a lifesaver. We were google translating text as a first localization pass and I guess it put carriage returns at the end of every translation. Thanks a lot