Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Please excuse the length of this question. I need to explain all this to help others and to avoid helpful contributors to provide answer without asking clarifications.

My requirement in one line: "to enable an Android phone to display Tamil characters properly".

Elaboration: Tamil, like any other Indian language has complex character rendering system. Unlike English or other Latin based script, it has glyph (what you see in screen) composed of more than one character. Android does not have ability to render such complex scripts (with exceptions). My aim is to know how I can provide such an ability to an Android phone or tablet.

Little background that I gathered so far: To display a glyph in screen, Android first needs a suitable font file. Android device has a folder /system/fonts which has few of them. The most interesting file in that folder is the DroidSansFallback.ttf. As the name suggests, when Android's system fails to find a character in system fonts (that could be DroidSans.ttf or DroidSans-Bold.ttf etc) it falls back to search it in DroidSansFallback.ttf.

By replacing a suitable font file from PC (Latha.ttf or Lohit-Tamil.ttf - these are fonts for Tamil) and DroidSansFallback.ttf will enable to display Tamil characters in the device. It is not so easy to replace and it involves rooting the device and mounting the system as writable.

In spite of those troubles, even if the DroidSansFallback.ttf is replaced, the Tamil characters that are displayed are not rendered properly. The Tamil character "தி" is a conjunct of two characters and instead of getting displayed as "தி", it will be displayed as "த ி" without space in between. Though this is enough to read short messages, it cannot be used to read books etc.

From Android 4.0 on wards, Tamil and other few languages are supported through browser as said in Android 4.x API overview as seen below.

Support for Indic fonts (Devanagari, Bengali, and Tamil, including the complex
character support needed for combining glyphs) in WebView and the built-in Browser

The words to notice is "in WebView and the built-in Browser", which means that Tamil characters will be rendered perfectly if it is rendered as HTML content and will not be rendered otherwise. Opera and other few browsers did this even before Android 4.0 by substituting image instead of character.

I noticed that in few devices that target Indian market (ex: LG Optimus One, most of Samsung phones and tablets) are able to display Tamil properly both in browser and even in places out of browser like in contacts, text messages, file names etc. To my surprise they do this even in Android 2.3 onwards. I also noticed that the same model targeting non-Indian country running same version of Android does not support Tamil character display.

This made me to investigate further and reached a conclusion that Android (as other Linux based OS) depends on a font rendering engine to display such complex characters. The two engines that I came across are Skia and Harfbuzz. I noticed LG uses skia and Samsung uses Harfbuzz libraries in their devices to bring this ability.

I came across many websites suggesting to replaces these libraries and fonts. It did not work and results in freezing. Fortunately I backed up using clockworkmod and hence I restored my phone.

Though I had explained this with Tamil, this is applicable for most of the Indian languages.

Here comes my question (if you are still reading;) ) Now, far sure it is clear that a TTF file should be present to provide characters and an appropriate libraries (libskia.so or libharfbuzz.so) are required to render them correctly. Does any one know how these manufacturers are able to provide the ability? I am even ready to build my own ROM from AOSP (Android Open Source Project).

share|improve this question
    
Cyanogenmod has capabilities to display right to left rendering of texts. Skia is standard for the rendering of the graphics. The results will vary, taking one Skia library from one ROM and putting it into another may be catastrophic as it would require building from scratch, by taking the AOSP source, and replace Skia with harfbuzz and recompile (You simply cannot "just" drop in harfbuzz into another ROM that is not built with that library - the libraries are linked in, so if the ROM's build is unaware of harfbuzz, it will not work) –  t0mm13b Oct 7 '12 at 15:31
    
@narayanan for some reason, the site m.oneindia.in/tamil renders tamil perfectly in Chrome on Android 4.1.2. What is this website doing correctly that the others don't? –  FMFF Jan 11 at 4:13

4 Answers 4

Rooted Phone

Android under the folder /system/fonts contains a file named "DroidSansFallback.ttf" supposed to contain all the language characters. Currently it lacks support for many, including Tamil.

One can always replace the file with one that contains Tamil characters, thus allowing the usage of Tamil on your phone.

From XDA Developers Thread - DroidSans Fallback Indic Font, users have tried and successfully used Tamil on their phones.

To acomplish this method, you need root access to your phone, in order to access the /system and change the Fallback file:

  • Read How do I root my device? if your phone isn't rooted yet.
  • Follow XDA Developers thread to see how to replace the file:

    Using and Android SDK environment:
    
    First Copy the DroidSansFallback.ttf file into your sdcard,
    then issue the following commands:
    
    adb shell
    su
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    cd /sdcard
    busybox cp DroidSansFallback.ttf /system/fonts
    mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
    exit
    exit
    
    Lastly, rebooted the phone
    

    Note: mount point isn't the same for all phones.


Android APP

While the above method may appeal to some users, I do prefer an APP when available.

Besides, Tamil has a keyboard with a total of 247 characters, while the English one only needs 26. So this becomes a major problem when typing:

See Wikipedia :: Tamil language - Writing System

The current Tamil script consists of 12 vowels, 18 consonants and one special character, the āytam. The vowels and consonants combine to form 216 compound characters, giving a total of 247 characters (12 + 18 + 1 + (12 x 18))


Thanks to Krishan, and is work on this subject, there's already an APP available to deal with both issues, the system wide usage of Tamil, and a keyboard that can be used to type Tamil Characters.

Read Krishan's post entitled Tamil Unicode Font for Android – Working for detailed information about the development of this solution.

To summarize

Krishan developed and published two APPs at Google Play that completely deal with the problem of having an entire Android OS in Tamil:

share|improve this answer
3  
I had already mentioned that replacing the font is only a partial solution which will display non-conjunct characters only and the conjuct characters will not be rendered properly. And the second solution regarding the app is not an accepted solution for me. It provides way to compose Tamil text by typing in English and converting and quoting the web pages as example is not acceptable as I had already said in my expectation. Any way thanks for your efforts and time. –  Narayanan Jul 23 '12 at 5:20

You appear to be describing issue 4153, a known bug in Android.

This issue has been reported as resolved in Jelly Bean. If this screenshot is correct, then the issue should be resolved. (I can't really tell myself, but I do have access to Jelly Bean and can make screenshots from it.)

ICS Test Page for Unicode

share|improve this answer
1  
Thanks, this appears not just a bug as I had stated that Tamil rendering is working even in Android 2.3.3 phones with some sort of intervention from the manufacturer. –  Narayanan Jul 23 '12 at 5:24
1  
On 20th July 2012, I attend Google's gDays and in which I witnessed Android JellyBean 4.1 did displayed Tamil characters even out of browser. Unfortunately I could not test anything more. –  Narayanan Jul 23 '12 at 5:25
    
With a comment on the question android.stackexchange.com/questions/26797/… I would say I am able to read Tamil in web pages, text files, SMS, contacts, file names, DOCX files through ThinkFree Office Mobile Viewer. I observed that this should be same for Telugu, Kannada, Bengali and Hindi as well. –  Narayanan Aug 1 '12 at 10:48

Install Opera Mini web Browser

In Opera Mini Web Browser type "about:Config"

use bitmap fonts for complex scripts : Select Yes

You can view all sites in tamil font in any brand mobile phone

Regards

share|improve this answer
3  
This is browser-internal bitmapping and is not an OS-wide solution (you won't be able to type or see Tamil or other Indic characters in SMSes, for example). Btw, what you've suggested has already been mentioned in the main post: > "Opera and other few browsers did this even before Android 4.0 by substituting image instead of character." –  user23404 Nov 9 '12 at 10:00

You do not need to root and replace the font on Android system.

Replace the firmware of your device with similar Indian region's firmware to render the Devanagari font correctly. Other regions' firmware do not render the Devanagari fonts correctly. Devanagari fonts correctly render on Indian Region's Android version 2.x.

share|improve this answer

protected by Community Apr 16 '13 at 5:26

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.