Reputation: 556
I'm new to iOS programming .. trying to use fonts in my application. While doing so I'm stuck at one step. I have downloaded Google's Open-Sans family fonts. Except the Open-Sans Regular, all fonts are working fine.. This is driving me crazy now ..
I have followed all the steps which are required to add a font into the project's directory.
Upvotes: 4
Views: 9521
Reputation: 2201
Extra bold is not available for OpenSans
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@" %@", name);
}
}
So Try OpenSans or OpenSans-Semibold example:-
label.font = [UIFont fontWithName:@"OpenSans-Semibold" size:16.0f];
Upvotes: -2
Reputation: 1079
It's either:
OpenSans-Regular.ttf
and check if target membership includes your app)Fonts provided by application
[UIFont fontWithName:"OpenSans" size:size];
, without "-Regular" par or spaces between open and sans)Upvotes: 22