I'm trying to add a new font to my iOS app. I've followed the following steps :
- Add my font file to my "res" folder
- Add my full font name to my plist file
- Add a UILabel subclass with the following code
Code:
- (id)initWithCoder:(NSCoder*)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
[self setFont:[UIFont fontWithName:@"Gotham-Book" size:self.font.pointSize]];
}
return self;
}
However the font is not displayed... I've try the following code to display all the fonts of my app and Gotham is not displayed...
for (NSString *familyName in [UIFont familyNames]) {
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) {
NSLog(@"%@", fontName);
}
}
I don't understand why it doesn't work. So if you can help me !