Gujarati fonts in Android

07/04/2014 09:15

Finally I managed to install gujarati fonts under android. I have Samsung Galaxy Ace with Froyo version of Android, and it by default has support for Hindi, but it could not decode gujarati fonts. After significant googling, I figured out that there is no clean way of adding the support of Gujarati fonts (or any other unicode fonts for that matter) in Android. You have to root your phone to achieve that.

How to root your phone? – now this question was not new to me. I was using Galaxy Pop CDMA a few months back, and I wanted to install VPN client for Cisco VPNs and at that time, I came to know that there is something called “rooting” your android phone. In simple terms, it means that one gets added privileges after the phone is rooted – very similar to root access under linux. So, I had used SuperOneClick software at that time (thanks to those genius guys for this wonderful easy software) and it worked like a charm. But, this time it had given me a lot of pain, but I learned so many things out of that. Basically, there’s a platform-tool, named adb, is available if you download your Android SDK. This tool is used to communicate between your PC and Android. Caveat here is that, you should not turn on the mass storage feature of the android, keep “USB debugging mode” enable while doing this.

Under Linux:
When you are a normal user under linux, you will not be able to use this tool with a normal user’s privileges. Use “sudo” (or get root privileges) to use this utility. Following are the simplest two commands:

#sudo ./adb kill-server
#sudo ./adb devices …….> This command will list down the android device connected to your pc

Under Windows:
This thing is tricky, you need to have proper drivers installed in order to use these commands. There are three drivers actually: 1) ADB interface driver, 2) Samsung USB composite device driver 3) Some Debugging port driver – COM1 or etc, I don’t remember it exactly. But better and easy way to identify the missing drivers is to go to “Device Manager” and search for “exclamation mark”, and try to load the drivers for all such devices. You will get the drivers from SuperOneClick’s driver package from : (https://forum.xda-developers.com/attachment.php?attachmentid=624177&d=1307984774 ).After driver installation only, you will be able to do “adb devices” under windows.

SuperOneClick did not work for me under linux, may be because of the USB transaction are different in windows and Linux. But under windows, it is really easy and you can complete the whole process under one minute.

Once your phone is rooted, you are almost the king, you can do anything with your phone. So, my next step was to install the gujarati fonts. First I had to find the unicode gujarati fonts, and that also gave me little trouble. I could not find free gujarati unicode fonts from internet. So I decided to use the fonts which are available in ubuntu by default. The fonts location is /usr/share/fonts/truetype. Search for lohit_guj.ttf under this location, copy this to your android sd card first. After that disable the mass storage feature from android, and enable the usb debugging. Then follow the steps.

* sudo ./adb kill-server
* sudo ./adb devices
You should see your device here
* sudo ./adb shell
This will give you the console access of your android device.
* su
This will give you the root access (make sure to tap “allow” button from your phone, because, the everytime any new application seeks the root access, the phone will display a pop up msg, and you have to grant the access)
* mount
This list down all the mounted devices
* mount -o rw,remount /dev/stl12 /system
/dev/stl12 is the block device from where my /system partition is mounted. You can replace whatever mount point you have.
* cd /sdcard
* mv lohit_guj.ttf DroidSansFallback.ttf
* dd if=/sdcard/DroidSansFallback.ttf of=/system/fonts/DroidSansFallback.ttf
* mount -o ro,remount /dev/stl12 /system

That’s it, gujarati support is now in your phone, Have fun!!!

—————

Back