Saturday, August 25, 2012

Jellybean (4.1) - Fixing Malayalam rendering in non-browser apps

Finally, Jellybean (Android 4.1) ships with default Malayalam font and font included in 4.1 is AnjaliNewLipi-light.ttf. All browser based apps (like Facebook, Chrome browser, Gmail, etc.) render Malayalam content properly expect one "Ra" issue.

But, all non-browser apps have rendering issue. Complex text layout is not rendered properly. Interestingly, if you build a non-browser based app and force the text widgets to use /system/fonts/AnjaliNewLipi-light.ttf, they get same rendering as the browser. With the support of many people in G+, we filed a ticket with Google and Google confirmed it as a known issue they are working on. We hope Google will fix it soon.

As we don't know how long Google will take to fix the issue, we have an interim option to fix the rendering issue if you are already rooted your Jellybean device (or planning to root your device). I'm not encouraging anybody to root your device and I do not take any responsibility for anything you do to your phone, whether be brick, break, or somehow mess it up :)

This is how you can fix the rendering issue (Note: this will work only on devices with Jellybean and not anything else)

Warning: If you make below change, AnjaliNewLipi-light will be the default font of the device. So English text might not look as nicer as before when default font is Roboto-Regular/Bold/Italic/BoldItalic.ttf.
  1. Install Issue35996.apk and check if second line is displayed properly. If yes, continue.
  2. Root your device running Jellybean
  3. Install ES File Explorer from Google Play
  4. Open ES File Explorer and enable Root Explorer, Mount File System options in settings
  5. Copy /system/etc/system_fonts.xml to your computer
  6. Open system_fonts.xml in text editor and add the following right after <familyset>. It must be the first entry after <familyset> tag.
        <family>
            <nameset>
                <name>anjali</name>
            </nameset>
            <fileset>
                <file>AnjaliNewLipi-light.ttf</file>
            </fileset>
        </family>
  7. Copy modified system_fonts.xml to /system/etc/system_fonts.xml
  8. Make sure /system/etc/system_fonts.xml has read permission for owner, group and user (rw-r--r--). You can check this using ES File Explorer by long pressing on the file and selecting Properties.
  9. Restart device
Before fix:

After fix:


Screenshot of Issue35996.apk in step #1:



1 comment:

Unknown said...

Vow Vow.. Thanks a lot.. Worked.. (y)