Hi! I have a problem displaying the Thai language in my game. I'm using a Thai font and if I check the Glyph Table, it has all the characters I use. But when I write a text in Unity (I'm using TMProUGUI but it's the same with Text), some Diacritical Marks don't appear. For example, appears like any help? Thanks!
The latest release of the TextMesh Pro package (version 3.2.0-pre.3) includes support for Diacritical Marks. However, this data needs to be manually populated until the functionality to extract this data from the GPOS table at runtime lands in some new future version of Unity. P.S. Support for OpenType Layout features is what I have been and continue to be working on. I am hoping to have this available in Unity 2020.3 or newer within the next 60 - 90 or less.
Thanks for the quick reply! So, how can I do to manually populate the functionality? I'm still learning about Unity and this is my first trying a a multilingual game, can you guide me?
Hello Stephan! Is there any update on when the OpenType Layout features will make it into Unity? In the meantime, can you offer some instructions for how to manually populate the layout data so that Indic scripts such as Thai are rendered properly? For reference, here is a good post explaining the issue we currently face in Thai (general summary: some vowels and tone marker diacritics need to change their position slightly depending on what's underneath them). Thanks, George
Nolkeg/AdjustTHWannayuk: Adjust Thai wannayuk position in Unity (github.com) I've been using my own solution for this. The code is very short. It's just an automated script to populate the Glyph Adjustment Pair list instead of manually typing and adding them yourself.
Hi there, when using your script, I seem to be getting a KeyNotFoundException? I'm using the NotoSansThai font. Is there a better font for Thai?
It looks like the code couldn't find specific TH glyp from the character look up table. By the way, this hack is not required anymore in unity 2021.3.16f1 + TMP 3.2 preview 4 because new version of Unity and TMP have the ability to extract kerning data directly out of the font so if you're on newer version just use the official way of doing it and export the TMP font back to your older project (I'm not sure if this is going to work though, but it's worth a try)