Search Unity

in TextMshPro when unsing arabic text with Taskeel , the WordInfo, WordCount give wrong result

Discussion in 'UGUI & TextMesh Pro' started by gamepower7, Aug 20, 2019.

  1. gamepower7

    gamepower7

    Joined:
    May 16, 2017
    Posts:
    27
    Hi ,
    When TextMeshPro text has one Arabic word With no Taskeel , the wordCount ,TMP_WordInfo give correct value of one word , but when one word contain Taskeel , the wordCount will be 2.

    m_TextMeshPro.text = "هاني" => m_TextMeshPro.textInfo.wordCoun have correct value of 1

    m_TextMeshPro.text = "هُاني" => m_TextMeshPro.textInfo.wordCoun have wrong value of 2 instead of 1

    the deference is the second line have [ ُ ] Taskeel , witch is a special character in Arabic language


    More about Tashkeel https://en.wikipedia.org/wiki/Arabic_alphabet#Short_vowels


    regards
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    My apologies for not replying sooner. I simply missed your post.

    I'll try taking a look over the next few days and follow up thereafter.

    P.S. If any posts go unanswered for more than a few days, always feel free to ping them to remind me.
     
    gamepower7 likes this.
  3. gamepower7

    gamepower7

    Joined:
    May 16, 2017
    Posts:
    27
    hi ,
    anything new ?
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I should be able to look into this shortly after the new releases are available.

    How are you using the word count in your project? Just looking for more insight on use cases.
     
  5. gamepower7

    gamepower7

    Joined:
    May 16, 2017
    Posts:
    27
    will , its not just the word count , for some reason , when I use the Tashkeel char , it split the word in to 2 at the Tashkeel char .
    for example , if I used my name char [ ه ا ن ي ] the result are ok



    https://drive.google.com/open?id=12waoSqd1GDPXdp7g9FkiZmyVYr2Vqw1R

    https://drive.google.com/open?id=1VJ4JNWmVQjwAB64C4dCKk-0-aOuIPGkO



    when I add the Tashell chat after the second letter [ ه ا ُ ن ي] the wordinfo now has 2 words



    https://drive.google.com/open?id=18jTC5-svKw_JWlN5Ty9Mxor_We87pOL3

    https://drive.google.com/open?id=1lh70bTMVpp0cynvd4fMMmFLCVJvlZrb8

    as for how do I use it , for example if I need to color each word with a deferent color , the words that has Tashkeel will be considered 2 word
     
    Last edited: Sep 24, 2019
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for the additional details.

    I'll try to get onto this as soon as possible.