Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TextMesh Pro RTL Text Mesh Pro. Free and Open-Source plugin to add Persian and Arabic support to TextMeshPro

Discussion in 'Unity UI & TextMesh Pro' started by sorencoder, Jun 12, 2018.

  1. sorencoder

    sorencoder

    Joined:
    Mar 27, 2017
    Posts:
    31
    Hi. I finally created a plugin to add Persian and Arabic support to TextMeshPro.

    Github link: https://github.com/sorencoder/RTLTMPro

    Features
    Realtime RTL Text
    You don't need to convert, copy and paste texts. Start writing and texts will be converted right away.



    Rich Text
    All Text Mesh Pro's tags are available in RTL Text Mesh Pro



    RTL InputField (See known issues)
    Realtime InputField is supported.



    Multiline
    Yes, This plugin has no problem with multiline RTL texts.



    AutoSize
    Auto Font Size is fully supported.



    English, Farsi and Arabic digits are supported


    Arabic Tashkeel
    Arabic tashkeel are supported. Also you can turn them off or on for every RTL Text Mesh Pro object.



    To see usage instructions visit github page:
    https://github.com/sorencoder/RTLTMPro

    Known Issues
    • Multiline has issues with English text.
    • InputField (and anything that was designed to work with TextMeshProUGUI script) will not work.
      Why it doesn't work? We need to override the text property of TextMeshProUGUI. But the text property is not defined virtual. You need to manually make the property virtual.
      • Open TMP_Text.cs from TextMeshPro source code
      • add virtual keyword to text property.
      • Open RTLTextMeshPro.cs and uncomment the top line where it says
        //#define RTL_OVERRIDE
      • Now you can use InputFields (and Dropdowns in future)

    @Stephan_B Would you make `text` property virtual in the source code so users don't have to make it virtual everytime they update? Would you gift a "virtual" keyword to all of users that want to use RTL languages?

    Have fun!
     
    Last edited: Jun 12, 2018
    Ali00405, Keita-kun and Johannski like this.