Member-only story

How to add custom font in SwiftUI project with XCode 15.

Oct 1, 2023
Photo by Alexander Andrews on Unsplash

Your file tree, add new font files

Add new .plist value

If you’re using XCode version over 14.x, there is not info.plist file.
Find out here: Project root > Target > Your app > Info
The key you need to add is “Fonts provided by application”
Put the file name you’ve added.

The real font name is going to be different from the file name.

You can find the actual font name by getting info on the font file.

See the “Full name”


Text("My New font").font(.custom("DM Sans", size: 16))

Use your fonts like this.

--

--

Fredric Cliver
Fredric Cliver

Written by Fredric Cliver

13+ years in the digital trenches. I decode complex tech concepts into actionable insights, focusing on AI, Software Engineering, and emerging technologies.

Responses (1)