Saturday, June 13, 2009

Uploading Lucida Grande to your iPhone

Preface: this would not be possible without Tukulesto's sparse tutorial. Recommended software: TouchTerm Lite and FontViewer on your iPhone.
Amazingly, Apple chose not to put OS X's signature font on their mobile platform. This can be corrected if you have a Mac handy and your iPhone is jailbroken.
For starters, have an sftp client on your Mac (Cyberduck is good). Log in and navigate to /System/Library/Fonts. There should be two things in it: CGFontCache.plist and the Cache directory (where the fonts actually live). Since 10.4, OS X has stored its property list files in binary rather than XML format: this can be converted using the plutil command line utility. The astute among you will notice that the OS on the iPhone itself has a plutil utility, but beware: the converters were stripped out by Apple.
The basic procedure is as follows: sftp into your iPhone, drag the fonts you want added into the Cache folder, then convert-edit-convert the CGFontCache property list to add the font's metadata, then shutdown/restart your iPhone to make the change take effect.
Why would you bother doing this? In my case, I wanted to see the Apple website rendered more faithfully, and to add more diversity of sans-serif fonts to Stanza's ebook reader (many of the defaults are derivatives of the same Grotesk gothic family). It's also good practice for hacking your iPhone.


-- Post From My iPod touch

No comments: