Search Unity

TextMesh Pro Feature Request: Fix Thai vowel

Discussion in 'UGUI & TextMesh Pro' started by nattyboyz, Mar 28, 2019.

  1. nattyboyz

    nattyboyz

    Joined:
    Jan 31, 2015
    Posts:
    4
    In Thai language, we have special vowels and tones that can be located differently

    Examples: ก้า กี้ / เก๋า เกิ๋น / เดียว เดี๋ยว เด๋ว /

    Untitled-5.jpg Untitled-5dd.jpg
    Untitled-3.jpg

    Unity UI text and Text Mesh Pro always displayed it incorrectly, so I fixed it by using code from
    https://gist.github.com/allfake/d4fde9c573eaa4d5461a07ad446faf18
    but since the new TMP don't come with source code, that solution is no longer works.
    Is it possible to have this feature on TMP?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The package manager versions of TextMesh Pro included with Unity 2018.3 and newer do include source code.

    Separately, I'll take a look at the reported behavior as well.
     
  3. xiangyi88889999

    xiangyi88889999

    Joined:
    Nov 7, 2018
    Posts:
    4
    This is still wrong after TextMesh Pro 2.1.0 pre3
    Example:
    ก้า กี้ / เก๋า เกิ๋น / เดียว เดี๋ยว เด๋ว / กิ๋ำ

    Like This upload_2020-1-2_14-34-45.png
     
  4. cpalma

    cpalma

    Joined:
    Oct 2, 2013
    Posts:
    1
    Is there any updates on this? I'm using 2.1.0 preview 14 and the characters mentioned above are still displayed incorrectly
     
  5. YoungMustBeRight

    YoungMustBeRight

    Joined:
    Oct 8, 2020
    Posts:
    2
    Any updates?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Currently working on the next preview releases which will include support for Diacritical Marks which is what is required for the above example.

    See the following post which includes additional information.
     
    YoungMustBeRight likes this.
  7. tokkiseul

    tokkiseul

    Joined:
    Mar 23, 2018
    Posts:
    1
    Hello! This also interests me a lot and wonder if there are any updates regarding this preview release.
     
  8. t1ny_bear

    t1ny_bear

    Joined:
    Oct 2, 2020
    Posts:
    16
    Hello, Stephan!
    Are there news about releasing next preview patch? Waiting for thai font integration possibility.
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Now that the latest releases are out, I am switching back to working on the preview releases which includes support for Diacritical Marks.

    I would like to have the first release available within the next 15 to 30 days.
     
    t1ny_bear likes this.
  10. t1ny_bear

    t1ny_bear

    Joined:
    Oct 2, 2020
    Posts:
    16
    Hello, Stephan! I've noticed version 3.0.5 that came out recently. Does this version bring support for Diactrical Marks you've mentioned before? Thanks!
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It does not. Those new features will be in the next set of preview releases which for Unity 2020 or newer will be version 3.2.0.
     
  12. Sghignifiss

    Sghignifiss

    Joined:
    Apr 12, 2015
    Posts:
    1
    Hi Stephan!

    First of all thank you so much for your work, it is awesome and helped me in infinite ways during all my developments!

    I'm currently facing Thai localization for my game and I really couldn't think about how I would have managed it without mark-to-mark adjustment tables. I'm using Unity 2019.4.3 with TMP 2.2.0-preview.2 and everything works really fine except a single issue I'm now encountering.
    I used mark-to-mark table for all available combinations of vowel marks and tone marks, which are:

    อิ่ อิ้ อิ๊ อิ๋
    อึ่ อึ้ อึ๊ อึ๋
    อี่ อี้ อี๊ อี๋
    อื่ อื้ อื๊ อื๋
    อั่ อั้ อั๊ อั๋
    อ่ำ อ้ำ อ๊ำ อ๋ำ
    (อ character is used just to have a base)

    Troubles came when I had to manage vowel character \u0E33 which is used in the last line of combinations. I found no way at all to manage it through a mark-to-mark adjustment rule since it behaves quite differently from other marks: it is placed after the tone mark but it has to be written under the tone mark itself and in any case TMP didn't seem to recognize the character at all because it somehow ignored every rule I made with it.

    upload_2022-1-18_17-50-40.png

    In the end I came up with a rough workaround by breaking up \u0E33 in its two componing characters (\u0E4D and \u0E32) and then replacing every couple of a tone mark and \u0E4D by swapping these two characters:

    upload_2022-1-18_17-42-58.png

    Then I made mark-to-mark rules to handle \u0E4D in relation of tone marks:

    upload_2022-1-18_17-45-19.png

    In this way it seems to work fine, but I'm wondering if maybe I'm missing something and there is another, easier way to handle \u0E33 vowel?
     
  13. bali33

    bali33

    Joined:
    Aug 14, 2011
    Posts:
    232
    Hello @Stephan_B
    I do have a similar issue, I tried to update to the new preview version but after that none of my texts would displayed. So I'd like to stick with the 3.0.6 version and still have thai text to be displayed correctly. reading this thread does not really indicates me what is the right way to do it.

    So, what is the right/best way to fix an issue like this:

    Capture d’écran 2022-10-20 à 11.57.48.png

    Thanks
     
  14. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    As per the release notes of version 3.2.0-pre.3 / package description, this newer version of the package contains update Shaders and TMP Essential Resources. As such, when you upgrade to version 3.2.0-pre.3 and do not re-import the TMP Essential Resources, text objects may not display.

    I would suggest updating to version 3.2.0-pre.3 and re-importing the TMP Essential Resources via the Window - TextMeshPro - Import TMP Essential Resources menu.
     
  15. bali33

    bali33

    Joined:
    Aug 14, 2011
    Posts:
    232
    Hello Stephan,
    I'll try that and let you know if it works.
    Thanks
     
  16. bali33

    bali33

    Joined:
    Aug 14, 2011
    Posts:
    232
    @Stephan_B ,

    I succeed to install the 3.2.0-pre.3 version and indeed, re-importing the Essential package fixed the font display issue.

    So now, how can I fix the "thai vowel" issue like the one I showed in my first post ? I mean, let's say I have to display the following thaï word : ยกเลิก in which there is ลิ. How can I find the letter and the special character id and then create a Mark To Base Adjustment entry ? Is there an easy way to explore and to find them ? Would be great to be able to enter a combination like ลิ and having the both character automatically retrieve and then be able to adjust offset.

    Thanks