iPhone provides number of fonts for developing the app but not all.
Sometimes we need to go beyond the fonts provided by iOS sdk.
Following steps will do the needful
1) Add desired font to project (It must be .tff or .otf);
2) Go to info.plist and create a UIAppFonts key if it's not there else go to step3;
3) This key's value should be set to "array";
4) Add font file names to this array (i.e., if font name is abcd.tff, add this to the UIAppFonts key's array);
5) Set font for object(s) in app just like you set for others: see example below</p>
myLabel.font = [UIFont fontWithName:@"abcd" size:12.0f];
To use light or bold version you've to add light and bold font of same.
0 Comment(s)