Thursday, November 7, 2013

Adding Custom Fonts To iOS Devices


Beginning with iOS 7, it is possible to add custom fonts to an iOS device via a mobile.config file.   The reference doc for how one creates such a file and includes a font as a payload can be found here.

Although somewhat complex, this option could be helpful for users who need to add fonts for significant languages still missing from iOS, such as Khmer, Myanmar, and Ethiopic/Amharic.  I have not tried to make such a file myself.

10 comments:

Andj said...

Hi Tom,

useful link. Its already spurned on soem work on Khmer and Myanmar: http://www.openroad.net.au/support/iOS

Tom Gewecke said...

Andj -- Very Cool!

Anonymous said...

After I'd installed tharlon Myanmar font, scripts written in zawgyi went awkward. Can't I use in parallel?

Tom Gewecke said...

No idea whether you can make real unicode compatible with zawfyi in iOS. Ask the people you got the fonts from.

Keith Martin said...

Very interesting! Could someone tell how to get the font data that's used in one of those mobile.config files? I'm really excited by this, but I assume it's not as simple as opening a TTF file in BBEdit... :)

Tom Gewecke said...

Keith -- the .ttf file has to be converted to a base64 encoded string, but I have not tried doing it myself.

Keith Martin said...

Nailed it! Thanks for that tip, it pointed me in the right direction. I'm now making a bit of software that will generate the required .mobileconfig file automatically when a font is selected.
This will, of course, be a bit of a problem with many font licenses, but that will be something for the user to check and manage.
I'll let you know when I've made a utility ready for others to try.

Keith Martin said...

Hi Tom - I've made a utility that makes it very easy to create these things: iOS Font Maker, free to download from http://thehelpful.com/iosfonts/
There are also some sample fonts ready to be installed from that page.

I've tested this on a Mac, but feedback for the Windows and Linux versions would be good to get. :)

Thanks for the original post and for the nudge re base64 encoding!

Keith

Axum Group said...

Thanks for sharing! Incorporating this into the next version of EthioType, an Ethiopic/Amharic keyboard app.

Chuck Bun said...

No work on my iPhone 5 IOS 7.1 . I need fonts Khmer for IOS 7.1