Creating a flip font is an easy task. You can find many posts about this on the net (mainly in xda forums) but creating a Malayalam font apk is little tricky. Steps mentioned in other places will not work for Malayalam font as the process will not copy GSUB tables correctly to the digitally signed font.
Tools needed:
- Windows machine
- Fontforge (http://sourceforge.net/projects/fontforge/files/latest/download?source=files)
- Apk Manager v4.9 (http://goo.gl/GKBHM)
- A working flip font (http://goo.gl/cfTJU)
- A blank digitally signed font BlankSigned.ttf (http://goo.gl/Gefuf)
- A font that you want to convert to flip font
Steps:
Create signed font
- Install Fontforge
- Download BlankSigned.ttf to local disk
- Run Fontforge
- Open Font -> Browse and select your font (ex: MyFont.ttf)
- File -> Open -> Browse and select BlankSigned.ttf
- Element -> Merge Fonts ... (Make sure you select this option from BlankSigned.ttf font window)
- Click OK. This will merge your font with BlankSigned.ttf font.
- File -> Generate Fonts ... -> Select TrueType for font type -> Enter a name for the font (ex: MyFont.ttf) -> Save. Try to use a font name without special chars or numbers to make things easier.
- If you get Errors detected window, just click Save
- Now you have a digitally signed font that you can include it in font apk
Create font apk
- Download Apk Manager v4.9 and unzip to local disk
- Copy working flip font (Kaumudi.apk) to apk_manager_4.9\place-apk-here-for-modding folder
- Open cmd window and cd to apk_manager_4.9
- Run "Script.bat"
- Press any key to continue on adb warning
- Type 22 and hit enter
- Type 1 to select Kaumudi.apk. If you see multiple apks, type the number corresponding to Kaumudi.apk
- Type 9 and hit enter to decompile apk. Don't close cmd window. We need it for later.
- Now you will see apk_manager_4.9\projects\Kaumudi.apk folder in file system
- Replace Kaumudi.ttf in apk_manager_4.9\projects\Kaumudi.apk\assets\fonts with your signed font (ex: MyFont.ttf). I'm going to use MyFont as the name of new font for rest of the steps. Change it to your actual font name. Also rest of the steps are for the files/folders in apk_manager_4.9\projects\Kaumudi.apk folder
- Rename assets/xml/Kaumudi.xml file to assets/xml/MyFont.xml
- Rename smali/com/monotype/android/font/Kaumudi folder to smali/com/monotype/android/font/MyFont
- Open each xml, yml, smali files in apk_manager_4.9\projects\Kaumudi.apk folder and sub folders in a text editor and replace Kaumudi with MyFont
- Switch back to cmd window
- Type 11 and hit enter to compile apk
- Type n for system apk and hit enter
- Type 12 and hit enter to sign apk
- Now you will see signedKaumudi.apk in apk_manager_4.9\place-apk-here-for-modding folder. Rename it to MyFont.apk. That's your flip font.
- If you have followed instructions correctly, you now have a flip font that you can install on your device.
Let me know if you find any errors in my instructions.