How to Add Gujarati and Other Indic Fonts in Android
Android 5.0 (Lollipop)
UPDATE: Google has finally added Gujarati fonts to Android 5.0 (Lollipop) in the Nexus line of phones. The fonts are called Noto Sans Gujarati and Noto Sans Gujarati UI and both come in regular and bold versions, though they are seemingly indistinguishable. Google still has to add Gujarati keyboard input though so we can type in Gujarati. Until then, SwiftKey Keyboard is currently offering a Gujarati input method. Images below show the Noto Sans Gujarati font displayed natively on my website. The third image shows the SwiftKey keyboar layout for Gujarati input.
As mentioned above, the font is only available in Google's Nexus phones, however. They are not included in AOSP versions of Android. So if you are using phones from Motorola, Oppo, HTC, etc., or if you are using a custom ROM such as Cyanogenmod, MIUI, etc., the font may not be included. It's up to the manufacturer or ROM developer to include the Gujarati font. Currently, Samsung and LG are on board as their line of newest phones do include their own Gujarati font (not Noto Sans Gujarati).
Android 4.4.4 (KitKat) and Lower
If your device will not be upgraded to Lollipop, please follow the instructions below to add Gujarati support.
Native Gujarati support in Android is still missing as of Android 4.4 (Kit-Kat). Google has included a few of the Indic languages, namely, Tamil, Malayalam, Kannada, Bengali, Hindi, and Telugu starting with Android 4.0 (Ice Cream Sandwich). This means that Android has a font that can render these languages. However, it seems only Hindi Input Method Editor (IME), a keyboard that allows you to type in these languages, is included in Android.
The languages that are still missing include Gujarati, Punjabi, Nepali, and some others. Being a Gujarati website, of course, we want to see Gujarati added to Android. However, complaints in Google's Android forums hasn't tipped Google into supporting Gujarati yet. There are two ways of being able to read Gujarati on your Android device: 1) Buy a phone that includes a Gujarati font, or 2) install or "flash" a Gujarati font to your Android OS. For the second option, Android fans have added a Gujarati font by replacing one that already exists. There are many websites that instruct you on replacing DroidSansFallback.ttf with a Gujarati font (such as Lohit-Gujarati.ttf or Shruti.ttf) in order to read Unicode Gujarati. However, this is not an ideal solution as this method might affect other languages or characters found in DroidSansFallback.ttf.
Phones That Support Gujarati
I'm assuming there aren't many phones that support Gujarati. However the few phones that I know that do are listed below. Please send me feedback and screenshots if you know of any others.
- Samsung Galaxy S3 and higher
- Samsung Galaxy Tab 3 7.0 and perhaps all the Samung Galaxy Tabs since they share the same software
- LG G3 now supports Gujarati and we can assume all future LG phones will support it.
- Oneplus One supports Gujarati and we can assume Oneplus two will also.
- Motorola Moto E 4G LTE, 2nd Generation 2015 model (Verizon prepaid) running Android 5.1 supports Gujarati. I assume all 2015 Motorola phones running Android 5.1 would also but cannot confirm.
Adding Gujarati Font to Lollipop (5.0.2 and below)
As mentioned above, Gujarati font is missing in AOSP builds of Lollipop. However, after examining the fonts.xml file in the system folder, there is a reference to Noto Sans Gujarati font. It just seems the font file itself is missing from the fonts folder.
So, on my extra phone that was rooted, I simply copied Noto Sans Gujarati fonts (regular and bold) to the fonts folder using ES File Explorer. (You need to enable Root Explorer option in ES File Explorer.) Once the file is copied, Gujarati will be enabled. There's nothing else to do. Only Noto Sans Gujarati fonts (regular and bold) must be copied since the filename specifically points to that font.
We will have to see in future whether the AOSP build of 5.1 includes this file. If so, then you will have Gujarati support without rooting at all.
Flashing Gujarati Fonts On Your Own (4.4.4 and below)
This page shows you how you can add a Gujarati font to your rooted Android device (along with the following language fonts: Punjabi, Nepali, Assamese, Marathi, Oriya, Sindhi, and Kashmiri). Unfortunately, adding fonts to Android requires root permissions. But, good news is that this method adds native Gujarati support without replacing any Android system fonts. This guide was possible with help from XDA Developers forum, credited below.
I've tested this on a Samsung Galaxy Nexus (CDMA) and LG Nexus 5 (GSM). This simple method gives you flawless Gujarati rendering natively as can be seen in the screenshots below.
First screenshot shows Gujarati in the Bookmarks menu of the PDF viewers in CyanogenMod. Second shows Gujarati text on my web page in Firefox. Notice the native Gujarati text in the address bar. Third shows a shortcut to my web page on the home screen with Gujarati in the title.
Warning: When flashing files in Android, there's a risk of bricking your device. Proceed cautiously at your own risk. I take no personal responsibility if you brick your device. You have been warned.
- Rooted Android device
- Device running a custom recovery such as TWRP recovery or Clockword Mod recovery
1. Download the Flashable ZIP for Your Device
I have tested the Jellybean version on CyanogenMod 10.2 running Jellybean 4.3.x on a Samsung Galaxy Nexus and it works perfectly. Even if your Jellybean version might differ slightly, you may want to try it on your device.
2. Flash the ZIP in Custom Recovery
Transfer the downloaded file to your device. Nexuses don't have external USB storage (SD Card) so it can be stored on the interal USB storage. Reboot your device into your custom recovery (TWRP or ClockworkMod). Follow the instructions for your recovery, respectively, to "flash" or "install" the ZIP. In TWRP, which is what I used, you select "Install", then find the ZIP on your USB internal storage or external SD card. Then swipe to flash. The flashing shouldn't take more than 1 second. If it takes longer, you've done something wrong.
3. Reboot Device
Reboot after the ZIP has been flashed. Once your device is up and running, you should now be able to view Gujarati. Start any website which has Unicode text to check it out.
Install Your Own Gujarati Font
The ZIP files above contain Lohit-Gujarati font, which is a free font included in Linux. I prefer Shruti font because it looks better on screens. You can install your own custom Gujarati font by adding that font to the ZIP and modifying the XML file.
Of course Shruti is not a free font so I can't distribute it. However, you can do whatever you wish as long as it's your device. You can change or add other Indic language fonts also using the same method below.
1. Add Your Font
Add your Gujarati font to the /system/fonts folder in the ZIP file. You don't have to change the file name.
2. Modify fallback_fonts.xml
Next, open the fallback_fonts.xml file found in /system/etc folder.
where Your-Gujarati-Filename.ttf would be your custom font in place of Lohit-Gujarati.
When you recompress the file, remember to maintain the original folder structure. If you have the orignal folder structure within a folder, flashing the file will fail, although no harm is done to your device.