Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display Kannada Text in Android application

I have a requirement to display kannada text in GCM alerts sent to an android app.

I followed these tutorials Install Read / Write Indian Language Fonts on Android and How to Write & Read in Indian Regional Language Fonts on Android.

Just to brief, I did following:

  1. Rooted Android Device
  2. Installed ES File Explorer (Free download from Android Market)
  3. Downloaded DroidSansFallback.ttf Indic TrueType Font and Save it in SD Card
  4. Open ES File Explorer – In settings, Enable Root Explorer and Mount System as RW
  5. Copy the file from SD Card root and Paste it to /System/Fonts (Overwrite if necessary)
  6. Reboot

But I ended up displaying Kannada text like this:

enter image description here

Whereas, I have sent ವಿಕಿಪೀಡಿಯ Thank you! from my back end server. How to display kannada exactly same as it was sent from the back end.

like image 260
Ayaz Pasha Avatar asked Jun 28 '13 12:06

Ayaz Pasha


1 Answers

Which Android version is it?

Versions before 4 don't have proper Kannada rendering support even if you supply a font, so it shows the matras separately from the consonants.

Where are you showing this text? It may work if you try to show it in the web browser, because web browsers have their own rendering engines. Try both the stock WebKit browser and Mozilla's Firefox for Android. Depending on your device and Android version, it may or may not work.

If it works in WebKit and you need it in an app, try integrating WebKit in your app instead of using regular text display.

Another thing you can try is to render your text as an image on the server and show the user that image. It won't be perfect, but it will be readable. (That's the technique that the Opera Mini Android browser uses, last time I checked.)

And hey, kudos for trying to make it work in Kannada!

like image 77
Amir E. Aharoni Avatar answered Nov 14 '22 00:11

Amir E. Aharoni