11
votes

I have tried deleted font from the xcode project and and copied again by dragging, but still custom font named "Helvetica-Neue-LT-Com-75-Bold-Outline.ttf" is not working on iphone 4 and 5c simulator but working in 5s simulator.

To set the font name to UILabel, I am using the name from fontbook app.

5
Have you ever tried clean project and rebuild it?caglar
yes I tried cleaning project also uninstalled application from simulatorParth Pandya
Select Front -> and select your target from File Incpector, it's worked for meDilip Tilonia

5 Answers

8
votes
  1. Delete application from simulator
  2. Clean (by hitting "CMD + K" in Xcode)
  3. Run again
42
votes

Follow this steps,it's work fine

1.Select the project

2.Select Targets->Build Phases->Copy Bundle Resoures->Click + Button->Add your Custom font

14
votes

Few things after including the font files in your project:

  1. Include them in the target
  2. Include them as bundle resources
  3. Include them on your app's plist
  4. Make sure you're referring to the correct font name.

You can log all fonts by putting this on your app delegate's didFinishLaunchingWithOptions:

for (NSString* family in [UIFont familyNames])
{
    NSLog(@"%@", family);

    for (NSString* name in [UIFont fontNamesForFamilyName: family])
    {
        NSLog(@"  %@", name);
    }
}

Details here: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

8
votes

My problem was that I had a fonts folder which contained my font files, and I added the file by selecting "Create folder references" instead of "Create groups".

When I did this, my fonts folder was blue (instead of yellow), and only the font folder appeared in bundle resources; the individual font files contained in the folder did not.

When I added the folder by selecting "Create groups" the individual font files were added to bundle resources and the fonts appeared in the simulator.

4
votes

Make sure you're not loading this custom font in the Launch Screen of the App. You can use images instead.

Custom fonts are not Loading in the LaunchScreen.storyboard