I recently posted Why is this label appearing unstyled? , and besides trying to work things out, have gone through some well-upvoted questions, including Use custom fonts in iPhone App , and others.
What I have done is:
Install Scurlock.TTF, installing it under the "Supporting files" folder. (Note: this is a best approximation as, while the question quoted above shows a "Resources" folder in its screenshot and said to be sure to put the font into the "Resources" folder. Maybe things have changed since that posting?)
Edit my info.plist file to add:
<key>Fonts provided by application</key> <array> <string>Scurlock.TTF</string> </array>
Attempt to access Scurlock by the likes of:
UIFont *font = [UIFont fontWithName:@"Scurlock" size:40]; UIFont *font = [UIFont fontWithName:@"Scurlock.TTF" size:40];
Run code that was suggested to me according to Why is this label appearing unstyled?:
for (NSString* family in [UIFont familyNames]) { NSLog(@"%@", family); for (NSString* name in [UIFont fontNamesForFamilyName: family]) NSLog(@" %@", name); }
This gave a long list of fonts, including one zero which I suspect may be a corrupt family, possibly a corrupt Scurlock.
I wanted to check both if the font (linked above) is corrupt (Font Squirrel had little trouble generating a webfont.zip from it, which is a sanity check at least), or whether the older articles recommended--all much further back than iOS 7--gave a dated answer.
How, in Xcode 5 and iOS 7, can I install a font (anywhere besides listing it under "Supporting Files")?, notify the system of its presence (such as defining the plist's only "Fonts provided by application" value), and use the font from my code, or otherwise do something that will work with my system and iOS 7?