IPhone non-system font name

I want to add a non-system font to my iPhone / iPad app.

I added a font file to the project, and also added a font to the UIAppFonts property of the UIAppFonts file.

To download a font, I use fontWithName from UIFont . But the name of the font is not like the name of the file, with or without an extension, and also the name that appears in the Font Book.

 UIFont* font = [UIFont fontWithName:@"What goes here?" size:10]; 

Where can I find the font name?

+5
ios fonts iphone cocoa-touch uifont
Nov 10 2018-10-11
source share
2 answers

UIFont +familyNames and then +fontNamesForFamilyName: should do the trick.

+5
Nov 10 2018-10-10
source share

If you open the ttf file in the Font Book on your Mac, the window title is the name that iOS also uses. (In my case, AvantGarde Bk BT)

enter image description here

+2
Jul 23 '13 at 1:31 on
source share



All Articles