ttf

Add a custom font to iOS app

I recently needed to add a custom font to my iOS app as the standard ones didn’t work for what I wanted.

I downloaded a .ttf file, (I used www.dafont.com) and copied it into my Xcode project.
The next step is to open your project’s Info.plist and add a new key “Fonts provided by application” and ensure its an array. In the first object of the array add the value “<fontname>.<fileextension>“. So where I used the font digitalism the value I entered was “digitalism.ttf

To then use this font on a label its just the same as any other font:

[myLabel setFont:[UIFont fontWithName:@"digitalism" size:20]];

Mime Types (especially for Web Fonts)

I am regularly having to go in search of mime types for web fonts, so thought I would put them here so I will know exactly where to go for them.

.eot      application/octet-stream
.woff     application/x-font-woff
.svg      image/svg+xml
.ttf        application/octet-stream

Feel free to add more mime types below that you think would be useful to others.

 Scroll to top