0

I'm facing a problem with the changing the font style of label. But I don't understand how it can be. I want to use "Helvetica Neue LT Pro 33 thin extended" style. And I've install it but when I've used like this

self.saveButton_label.text = NSLocalizedString(@"Saved", nil);
self.saveButton_label.font = [UIFont fontWithName:@"Helvetica Neue LT Pro 33 Thin Extended" size: 12.5];

It does not work.but when I've tried like this

self.saveButton_label.text = NSLocalizedString(@"Saved", nil);
self.saveButton_label.font = [UIFont fontWithName:@"Helvetica Neue LT Pro" size: 12.5];

it works but the problem was that It set the style "Helvetica Neue LT Pro 73 Bold Extended" And I have installed different style of Helvetica Neue enter image description here

please answer if anybody know that how can I use "Helvetica Neue LT Pro 33 thin Extended" thanks in advance...

  • You need hyphen in "Helvetica Neue LT Pro 33-Thin Extended"; possible duplicate of http://stackoverflow.com/questions/9907100/issues-with-setting-some-different-font-for-uilabel. Call `[UIFont fontNamesForFamilyName:@"Helvetica Neue LT Pro"]` to see the name the system wants from you – RobP Apr 14 '14 at 07:55
  • To make sure what fonts (together with its names) that your application provides, you have to populate it. See this link http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/ on how to do this – mownier Apr 14 '14 at 08:01
  • thanks to all of you but I just want family name of "Helvetica Neue LT Pro 33 thin extended". –  Apr 14 '14 at 08:13

1 Answers1

0

Fonts have programmatic names that differ from what you see in the Fonts app. The family is followed by a hyphen, then the style. For best results, call

NSArray *fontFamilyNames = [UIFont fontNamesForFamilyName:@"Helvetica Neue LT Pro"]

and log what you get back to see just how the strings look (or inspect in debugger). You'll probably need a hyphen in "Helvetica Neue LT Pro 33-Thin Extended". Once you get the name just right, things should work fine. See also Issues with setting some different font for UILabel for an instance of this issue.

Community
  • 1
  • 1
RobP
  • 9,144
  • 3
  • 20
  • 33
  • Hey, I've done but still I cannot find "Helvetica Neue LT Pro 33 Thin Extended" font style. –  Apr 14 '14 at 09:41