iosuifont

Must one add custom font file to info.plist in Xcode?


Just a question about adding a custom font in Xcode. After I add it to my project's resources as a ttf file, I can use it inside a label in my storyboard for example. But do I need to add it to the info.plist file too?


Solution

  • Yes, you must add custom fonts to your Info.plist. You do this with the UIAppFont Info.plist key (which shows up as Fonts provided by application in the plist editor).

    Here is the relevant documentation.

    And an example:

    <key>UIAppFonts</key>
    <array>
        <string>SomeFont.otf</string>
        <string>SomeOtherFont.otf</string>
    </array>