Reputation: 1
I have added Imago font (including bold, italic and those both with those names: boolta, med and medlta) to Info.plist, but now I'm totally stuck with several tutorials.
I'm using storyboard mode.
Could someboby tell me what codes I have to write and where to get these font to work?
Upvotes: 0
Views: 122
Reputation: 1573
been having a lot of issues with fonts myself recently and there are a few things I suggest checking: -
1/ Always use .ttf format
2/ Make sure your font is included in 'Copy Bundle Resources' in your project 'Build Phases'
3/ Custom fonts should be defined in the array in your '[appname]-Info.plist' like you said above, it's under the heading 'Fonts provided by application'
4/ Make sure that you are using the correct font name as it is usually different to the filename. To get a list of available font names use the below code. Just using finders 'Get Info' is not always reliable: -
for (NSString* family in [UIFont familyNames]){
for (NSString* name in [UIFont fontNamesForFamilyName: family]){
NSLog(@"font=%@", name);
}
}
Then use the font name outputted in your log
5/ If that STILL doesn't work, it may mean your font encoding is a little messed up. I had this recently with a .ttf font, the app just couldn't see it so I stuffed the file into this online converter and whatever the issue was disappeared, magic!
Upvotes: 1