← blog

Installing fonts on Firefox OS Developer Preview Devices (Keon/Peak)

Stock Firefox OS (B2G) comes out without any support for many languages (especially Indic, like Bengali, Hindi, Tamil…). Thus, you cannot view websites or apps containing text in those “unsupported” languages. However, doomsday ain’t here because you can install custom fonts of your choice onto your Firefox OS Device, let’s see how!

Bangla text being rendered correctly

Preparing for ADB

We need the Android ADB tool for our purposes, you can get adb on Ubuntu by simply typing installing the android-tools-adb package.

sudo apt-get install android-tools-adb

If you don’t have this package on your repository or you are using another operating system, you can follow this excellent guide.

After you install ADB, make sure to add the udev rules as specified in the blog post I previously linked to. (Ubuntu users need to do this too!)

Done? Okay, now connect your phone via USB, pop open a Terminal and type in adb devices. If it shows a device entry of your phone, you’re lucky! Otherwise, you are a victim of a nasty bug! Don’t panic, just navigate to Settings > Internet Sharing* and toggle USB tethering to On and after a second, turn it off. Try the adb devices command again! Tada!

Installing fonts

  • Make sure you have the** .ttf** file (of your favorite font for the language you want to add support of) handy! In my example, I am choosing SolaimanLipi, a font for the Bangla (bn-BD) language.

  • In your Terminal:

adb remount
adb push /path/to/your/font.ttf /system/fonts/
adb reboot

Now, Your phone should reboot and you should see Text rendering properly!