Entering/displaying Hindi (Devanagari) font


I apologize in advance if this has been properly explained elsewhere, but I couldn’t really find the complete solution in the various posts. I’m trying to allow the entering (in TextEditor) and displaying of text in Hindi font. I could use a specific freeware Indian font for that, but I thought that now that Unicode supports Indian fonts and it’s available by default on both Mac and Windows I should rather go for that option.

So I activated the Asian languages options on my XP machine and lo and behold I was able to type Hindi script on Notepad, VC++, etc… by just selecting the Hindi keyboard in the Language bar. However, when I type any text in a Juce label (TextEditor), nothing happens. The cursor shakes, but stays at the same place, like the character is not accepted.

Could you please let me know what I need to do? I saw some posts about defining a specific default font for that component, but I wouldn’t know which one to specify. This is all quite magical to me, because when I type text in the Notepad, the selected font is Lucida, yet it displays Hindi script, so I don’t know whether the Lucida font has been expanded with Indian characters, or it’s a separate font that is used in the background.

Thanks for your help!


Unfortunately, it is currently not possible to input or edit Hindi (or any other Complex Text language) in Juce. The Juce TextEditor (and all other text input controls) only support editing text in “Simple” languages.

It is possible to display Hindi (and any other Complex Text language) using the AttributedString and TextLayout classes. This only works on Vista (with Platform Update) and later versions of Windows, Mac OS X 10.5+ and iOS 3.2+. It is very unlikely you will ever see support for Complex Text on Windows XP in Juce.

Oh, I see… Thanks a lot for the info. I’ll go back to the initial idea of using a custom font, because I definitely need it to work on XP as well. It will also help me avoid the problem of glyphs combining.

What is considered a Complex text language? I see Chinese and Japanese scripts work.

Chinese, Japanese and Korean are all “Simple” languages.
Examples of Complex Text Languages: Hebrew, Arabic, Hindi, Urdu, Thai, Most Indic Languages

Thanks. I understand the problem now.

I have found a solution using a specific font. The problem was finding one that had the same mapping on Mac and Windows. Only problem is that users will have to install that, instead of using the inbuilt Unicode fonts.