TextMeshPro in Unity shows a vertical line | in Kannada language instead of the text

69 Views Asked by At

I am using TextMeshPro to show Kannada language in Unity and there is a problem with ZWNJ character (Unicode: U+200C). It shows up as a vertical line in the text. Example image: 1

Example wrong Kannada text using TextMeshPro

I have tested with multiple Unicode and Non-Unicode fonts but I get the same result.

The expected text is: ಕೋರ್ಸ್‌ಗಳಿಗೆ ಪ್ರವೇಶ

The string that is causing the problem seems to be near the character Kannada character However I do not know Kannada and have no idea how it is structured. It seems like the ZWNJ character can determine the shape of not only the previous character but a series of characters in a word.

That being said, I can edit the font and remove the ZWNJ character so that it won't show up but it will obviously change the text and I that's not what I intend to do.

I have installed a Unity plugin (Indian Font Corrector with support for Kannada) which fixed a few issues of Kannada text but this one particular issue still persists.

Based on what I know so far: Unity doesn't support GSUB to substitute glyphs in font tables for languages such as Kannada, therefore it cannot replace the right characters. For that to work, either a magic update of TextMeshPro or Unity is required, (which is not the case as of today) or, a special font for Kannada is required (which I would apreciate if you know any).

If you have any experience integrating Kannada language in Unity I would love to know how you managed to do that. Thanks in advance.

0

There are 0 best solutions below