Adding font in iPhone application

I'm trying to add a custom font to my iPhone app.

The font's name is: Susa-Regular.otf

I downloaded the font, installed it, dragged it over to xCode. Then I went into info.plist and added a row called "Fonts provided by application" and typed in Susa-Regular.otf

 UILabel *myLabel = [[UILabel alloc]initWithFrame:frame];
 [myLabel setFont:[UIFont fontWithName:@"Susa-Regular" size: 35]];

When I run the app, the font is still the same. I don't get any error messages either.

Any idea why it doesn't work?

Answers


More than likely the "font name" is not the same as the file name.

Open the font in Font Book and see how it represents the font name and use that instead with spaces removed.

You can also use [UIFont familyNames] and [UIFont fontNamesForFamilyName:] to discover what name iOS is using for it.


Need Your Help

Can't get cabal update to work inside corporate network

haskell cabal

I'm trying to use haskell at work. I have installed the HP, but I can't get cabal to update. I assume this is some firewall or dns problem.

Prestashop ModuleAdminController use simple template

prestashop prestashop-1.5

Trying to figure out why something like the below cant work. There is a tab in the preferences admin section that points to this controller but when going to it it always output a blank page. I h...