Since it is absolutely critical for us to render text in Devnagri, we will be left with no option but to move away from Unity if this is not supported. This problem will also surface for other Indian languages (like Gujarati, Bengali which are not written using Devnagri script) where there are conjunct words.įrom Graham's posts it appears that unless we do this ourselves Unity will not render these words.
So unless such substitutions are available in the font itself it is practically impossible to write code that will do these substitutions. More so because Devnagri is used in multiple languages and each of the languages may have exceptions / idiosyncrasies. However building a generic rule for substitutions and then implementing it will be a challenge. By reading what Bakno and Graham have written it appears that one needs to do these substitutions through code. I have been following the messages on this thread. However when we use the same font inside Unity, these words render incorrectly. These words render fine in other editors with a font by the name Mangal. We also have been facing an issue with rendering words with conjunct consonants.
How can I also get it to work well in Unity? Any help would be most appreciated.
The deal breaker though is when one tries to use vowel modifiers, particularly the vowel modifier "i" (\u093F) which is supposed to be displayed before the consonant in question in Unity these are showing up afterwards and visually connecting to the following letter, which is incorrect enough that reading becomes impossible.ĭevanagari is important to me, and it works well in a lot of applications.
This is structurally correct (a Hindi reader could comprehend it in a pinch), but highly illegible. Unfortunately, when I try to render the above Unicode character sequence in Unity, instead of getting two glyphs, I get three: one for "ya", one for "j" (i.e. This isn't an isolated case there are many such glyphs, and similar techniques are used to handle essential language features like vowel modifiers. So the correct display of this word would have one glyph for "ya" and one glyph for "jña". Using a decent Devanagari-enabled font (anything from Arial Unicode MS, to third-party ones like Siddhanta ( ) ), this renders correctly, because the last three characters (ja, virama, ña) actually resolve to a single glyph, which is a special character used for the character transliterated as "jña".
In the case of Devanagari fonts, these glyphs are critical the characters in the PDF above are sufficient to define all of the characters needed for the language, but insufficient to render them in a legible manner.įor example, the simple word "yajña" (in transliterated text) is represented in Devanagari as \u092F (ya), \u091c (ja), \u094d (virama), \u091e (ña). The issue is with the extended glyphs that these fonts provide to support combinations of characters these glyphs are beyond the range provided in the PDF linked above, and are used as part of the character->glyph mapping in the font.
However, neither the stock Unity GUI font renderer, nor any of the several font-rendering-related assets that I've downloaded, has managed to render it correctly. I have several TTF fonts that have very good support for Devanagari, and which render well in web browsers, Notepad etc. I am very interested in rendering Unicode text involving Devanagari characters (used for languages like Hindi, Sanskrit, etc.).