Display Kannada text in an Android app

I have a requirement to display kannada text in GCM alerts sent to the Android app.

I followed these tutorials Install fonts for reading / writing Indian language on Android and How to write and read Indian language fonts on Android .

Just to be brief, I did the following:

  • Advanced Android Device
  • Installed ES Explorer (free download from Android Market)
  • Downloaded DroidSansFallback.ttf Display the TrueType font and save it on the SD card.
  • Open ES File Explorer - In Settings, Turn on Root Explorer and Mount System as RW
  • Copy the file from the root of the SD Card and paste it into / System / Fonts (Overwrite if necessary)
  • Reboot

But I ended up showing Kannada text as follows:

enter image description here

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

+6
source share
2 answers

What version of Android?

Versions before 4 do not have proper Kannada rendering support, even if you supply a font, so it displays mattresses separately from consonants.

Where do you display this text? It may work if you try to display it in a web browser because web browsers have their own rendering mechanisms. Try using WebKit and Mozilla Firefox for Android. Depending on your device and version of Android, it may or may not work.

If it works in WebKit, and you need it in the application, try integrating WebKit into your application, instead of the usual text display.

Another thing you can try is to render the text as an image on the server and show the user this image. It will not be perfect, but it will be readable. (This is the method that Opera Mini Android browser uses the last time I checked.)

And boasted, trying to get him to work in Kannada!

+1
source

An easier way to read Kannada on the Internet is to use the Opera Mini application, which, of course, is available on the Playstore.

  • Download Opera Mini
  • Enter "about: config" in the URL
  • Enable bitmap fonts for complex scripts I mean make it YES

Now you can easily read the Kannada script!

You cannot enter or read regular Kannada messages or Whatsapp messages. But having a primitive Android phone that is not rooted is the best you can get, I think!

0
source

Source: https://habr.com/ru/post/948319/


All Articles