By Jeff LaMarche on August 16, 2010
I’m not sure if Apple publishes an official list of supported fonts on iOS, but when working with designers, it’s a questions that we developers often need the answer too. Fortunately, it’s easy enough to determine it. In fact, the code to generate the list of fonts is the first (and so far only) thing that I’ve put into Xcode 4′s new snippet feature. I’m generally not a big snippet fan. If I use code enough that I feel a need to have it as a snippet, more often than not, it makes sense to encapsulate that functionality generically in a class or category or as part of a common library.
But, there are definitely pieces of code that it’s good to have around and that don’t really lend themselves to that. Here’s my snippet for generating font and family names. Cherish this; I slaved for hours over it. Well, okay… maybe not hours, but it did take me a minute or two to type it in.
By adamwulf on March 2, 2009