iosfont - A script to install fonts on iOS

No Comments

Show me the code!

A few days ago I had the (arguably) bright idea of trying to install fonts on my iPhone so that I could use them in Apple's Pages application. The entire manual process was, in short, incredibly annoying:

  • Open the font in a program which allows you to review its name tables (Font Book on OS X, Font Forge elsewhere.)
  • Note four attributes of the font: PostScript Name, Full Name, Family, and SubFamily.
  • Connect to your iOS device and copy down 6 property list files.
  • Add those four pieces of information you got about your font to the six property list (.plist) files you downloaded from your device.
  • Copy the updated property list files back to your device.
  • Copy the font you want to install to your device.
  • Reboot your device and hope that you didn't screw it up because if you did you'll have to revert the changes you made and try again.

And all of that just to install a single font! Most of the time you'll want to install an entire font family, so you'd need to go through (at least parts of) that process four times!

Fortunately, computers are really good at mindless detail-oriented work. After installing exactly one font manually I decided to write a script to automate the process. Now, using this script, installing a font is this simple:

iosfont install myiOSdevice.local Roboto.ttf

You can then use that font in Pages, your favorite reading application, on the web, or any other application that supports fonts.

Of course, I didn't want to release it when it only supported installation. After it met my needs I cleaned it up really nice and made it handle backups, restore from backup, update itself, and handle uninstalling fonts.

My hope is not that this becomes the end-all solution for installing fonts as it is still incredibly cumbersome. My aim instead is for it to get enough attention to pressure Apple to include the feature into a future release of iOS. So, Apple, if you're reading this, iOS 6?

You can check out the project at its website, iosfont.com.

Be the first to write a comment!