How to Use Google Fonts in an iOS App
Question details
The user wants to use fonts from Google Fonts or other font libraries in an iOS app.

- Product
- Google Fonts and Xcode
- Device & OS
- iOS
- Scenario
- A developer wants to distribute an iOS app that uses downloaded or installed custom fonts.
- Observed behavior
- The goal is to include licensed font files in the app and make them available to its interface.
Download the font files from their authorized source and read each font's license to confirm that app embedding and distribution are permitted. Identify the font files and the iOS app target in your Xcode project.
Bundle and register licensed fonts in Xcode
Use this method to make a permitted custom font available to your iOS app when it is distributed.
The license for each font controls whether and how you may embed it. Fonts from DaFont, FontSpace, and other libraries can have different terms, so check the license for the specific font.
A font installed on a device with a tool such as iFont is not automatically included in your app bundle. Bundle the licensed files so users do not need to install them separately.
Drag the downloaded .ttf or .otf files into your Xcode project. In the import dialog, select your app target and copy the files into the project if needed.
Select each font file in Xcode and check Target Membership in the File inspector. In the app target's Build Phases, confirm the files appear under Copy Bundle Resources.
Open the app target's Info settings or Info.plist and add the UIAppFonts key, displayed as Fonts provided by application. Add an item for each font file using its bundle-relative filename, including the extension.
Check the font's PostScript name in a font viewer, or print UIFont.familyNames and UIFont.fontNames(forFamilyName:) in your app to find the registered name.
In UIKit, load the font with UIFont(name: "PostScriptName", size: 18), replacing the example name with the actual registered name. Build and run the app to confirm that the font appears.

Document your iOS font choices with WPS Office
WPS Office is a free, lightweight alternative for writing project notes and reviewing documents. Its familiar interface and Microsoft Office format support make it easy to move existing documentation, though it does not bundle fonts into iOS apps.

Frequently Asked Questions
Can I use any Google Font in a commercial iOS app?
Check the license linked on the specific font's Google Fonts page. Use and distribute the font in your app only if its license permits your intended embedding and you meet its conditions.
Does installing a font with iFont add it to my app?
No. A font installed on your device is not automatically bundled with your app. Add the licensed font file to your Xcode target and register it under UIAppFonts.
Why does UIFont return nil for my custom font?
Check that the font file is included in the app target, listed under UIAppFonts with the correct bundle-relative filename, and loaded using its registered PostScript name rather than just the filename.
Can I use fonts from DaFont or FontSpace in an iOS app?
Yes, if the specific font's license permits app embedding and distribution. Review its license before adding the downloaded file to your Xcode project.




