There’s just one more configuration step before we can start using our custom fonts. We have to tell iOS about the fonts by editing the app’s
UIAppFontskey with an array of strings as the value. Each string should be the relative path to a custom font file in your app bundle.
The name of the font is not necessarily the font’s file name. Instead, it’s the font’s PostScript name. You can find the PostScript name by double clicking the font file to install it on your Mac. Then launch the FontBook app, find the font, and look at its info pane as shown below.
Say goodbye to importing custom fonts via property lists as FontBlaster automatically imports and loads all fonts in your app’s NSBundles with one line of code.
Previously: Installing Fonts on iOS.
Update (2017-04-05): Curt Clifton:
With this in place, you can delete the
UIAppFontskey and value from your
Info.plist. Now whenever you want to change the fonts embedded in your app, it’s as simple as changing the files in the
Fontsgroup of your Xcode project and recompiling.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.