1
votes

I'm working on an iOS app and it needs to use some specific fonts. These fonts belong to the same family, which makes using them a little difficult. I'm currently declaring them like this:

    self.fStandardFont = [UIFont fontWithName:@"Helvetica Neue LT Std" size:16];
    self.fLabelTextFont = [UIFont fontWithName:@"Helvetica Neue LT Std" size:14];

Where 'Helvetica Neue Lt Std' is the name of the font family, and is the name that appears when loaded in font book:

http://imgur.com/3d0gkB7

The file name of the font that I need to use for the 'label text' variable is 'HelveticaNeueLTStd-ThCn.otf'. Any ideas on how I can accomplish using this specific font? It's been added to XCode.

NOTE: The issue is that I need to pick between two of the same family name. One is 'Helvetica Neue LT Std' but is 37 Thin Condensed, the other is 'Helvetica Neue LT Std' and is 67 Medium Condensed.

1

1 Answers

0
votes

So your fonts just aren't working? You almost guaranteed have the wrong name (if you've already added it to the plist).

Check your font name:

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

However I'd also check out this answer:

Font not loading in XCode

The .otf may be the problem.