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 TextMeshPro: incorrect Right-to-Left rendering

Discussion in 'UGUI & TextMesh Pro' started by Nimja, Apr 1, 2022.

  1. Nimja


    Mar 19, 2013

    I've been using the Localization package to have support for multiple languages. However, I am having a problem rendering Right-to-Left text in a TextMeshPro element. Setting the
    flag seems to just invert the order of characters. However, this is incorrect; certain substrings should not be inverted, specifically, numbers - numerals are still read left-to-right. Also, RTL text can contain LTR text (English acronyms, for example), this case cannot be handled by just inverting the string as it will invert the LTR substring.

    As it stands, I would have to scan strings and invert such substrings so that TMPro's inversion will keep them in the correct order in every place that my code sets text in a TextMeshPro Text element; at which point I feel it should just be something that TMPro should handle correctly.

    Thank you.