Skip to main content

Launching the project 'i18nWidgets for Android'

A lot of Android devices, platforms and apps have several issues regarding rendering of non-English text especially that of Indic text. Though many of them claim to support various Indic and other languages, it usually either means that they have a font for that language included or they have some of the native apps supporting all these languages. But this does not mean all the app will be able to render the non-English text properly. This usually happens for one of the following problem being present:

1. No fonts added in the device (or the native android system)
2. Fonts are not accessible by the third party application
3. App has its own Unicode font, but the native android system does not support text layout rendering for the language
4. App has the font and the android system also supports the language, but the sdk for the particular platform does not have widgets integrated with the complex text rendering features.

This problem gave birth to the idea of developing and extending android widgets which will be integrated with text layout and rendering system on their own. So that, the apps that make use of these widgets will have their own independent rendering system free from the underlying bugs and limitations of the base android system.

The good part is, we do not need to rewrite those rendering systems. The two very well known projects that we need to make use of are Harfbuzz and Freetype. Harfbuzz for text layout of the complex scripts, and Freetype for drawing the font glyphs. 

So, this is what the project 'i18nWidgets for Android' is, under which we are developing independent widgets for app development which will have their own complex text rendering support through integration with freetype and harfbuzz libraries.



The project tree is already made suitable for using with eclipse and hence is readily testable from within eclipse. There are three dependencies to take care of while building:
1. Andoroid SDK 14/15: You may have to configure your development environment for Android SDK 14/15 
2. Android NDK 8: Make sure to have NDK 8 support enabled. 
3. Also have the appcompat_v7_2 library added properly to the project dependencies. 

Please make sure to have exact sdk and ndk versions setup, as the project includes working with native C/C++ libraries along with android platform and hence may run into tedious binary incompatibility issues if not built with proper resources. I have made best attempt to keep things simple for working within eclipse, but do go through the documentation of above development environment thoroughly if you are new to developing native android apps, in case you are struck at some compilation issue.

The project tree has following important components:
1. /jni : This contains the complex-script-rendering library that integrates Android Java widget with the C/C++ libraries of Harfbuzz and Freetype. The entire source tree of particular working snapshot of HB and FT are given in the repo to avoid any incompatibilities during the compilation. Also their makefiles are tuned to work with the given setup.
2. /src/gujaratirendering : This package contains a widget IndicTextView, an extension to the TextView widget which can render Gujarati text. Currently 
3. /src/com/example/i18nwidgetdemo: This is a demo package for testing the the IndicTextView widget with sample text on a simple app screen with Lohit-Gujarati font.
4. /assets: It contains the Lohit-Gujarati font to be used in the demo app

The library complex-script-rendering is based on the original work from Shiva Kumar, and is enhanced and made more generic. Indeed the attempt is to make it further generic and extendable. 

As of now, the project supports text rendering on app being developed for ICS platform and Gujarati language, but the language is not a necessarily limitation. Its just that I tried it with one language to start with, and this can be easily extended and made flexible for auto-supporting any language on the fly. Currently, one will have to make a small change in the complex-script-rendering.c to support language other than Gujarati and add the font of the respective language.

The objectives of the project are:
1. To further improve the library and the widgets code (may involve a lot of code cleaning to fit the norms)
2. Add support for all the languages, by detecting the language of the running text
3. Add more extended widgets to support complete android SDK
4. Create and maintain different branches supporting different android platforms

As of now the platform supported is Android 4.0.3 ICS. One would argue why support an older revision, but that's exactly where the problem is relevant. As many of the lower end widely used android devices are still to upgrade to the latest version, there are vast number of users still struggling to use their native languages, where as the developers who wish to maintain compatibility with these devices are also struggling while making apps for those users. 

While the language support on android systems and their sdk is continuously improving, there is no reason why an independent, reliable, native lang support cannot be added to the apps with help of widgets developed in such manner. This would only improve the reach of technology to those who are facing the economical and linguistic barriers. 

Comments

Popular posts from this blog

PVR is so wierd!

Yesterday we went second time to a mall bit far from office to complete the earlier failed mission of watching this 3D movie, Clash of the Titans. On ticket counter, we were first told that evening show was house full. Then we asked for a night show, and were told there isn't any show then and the gentleman handed us the pamphlet of all movie schedules. We checked on the nearby digital kiosk and also on the printed schedule to be sure of the show timings. Then went to second counter, and asked the lady for the night show tickets, and without any problem got the tickets for back seats. In fact this show was hardly 20% full, wonder how the evening show became houseful.

But the biggest wonder/blunder is yet to come. On the entrance we were stopped for having a laptop bag along with (we had went straight after the office). In spite of having checked the bag, we were not allowed, because laptops were not allowed inside! Then we asked for keeping it at the baggage counter. But then, the…

My first web blog

This may be the common first post for every blogger. And even I want to say,

Hello everybody,

I have seen that blogging has been a crucial subject for many professionals and internet savvy people. Thanks to all of those whose concern encouraged me to create my first blog.
Now lets see how it works for me.

Cheers!

Lohit, Fedora and Community

First: _Some updates on Lohit Malayalam fonts_
Recently, there has been a huge agitation by Malayalam community about the bugs in the f9 final version of lohit fonts. You can get a glimpse of it here. Most of these were either last minute hickups or not reported at all until then. But whatever it was, the final product could not be buggy. So, within a short span of time, all these bugs (#444559, #444561, #444563) were fixed for Lohit and tagged into for the f9 final. So the version in fedora and latest upstream, lohit-2.2.1 is free of all these bugs. Malayalam users would be able to find the fixes in the following screenshot.
Second: _Some comments on the events going around_
After working for so many years on so many languages for so many different tools and applications, sometimes for some organizations, sometimes just out of passion, I (or should I say we, the language computing guys) have developed this immense love for all the languages of India. They are all rich in their heritage,…