Note that there are some explanatory texts on larger screens.

plurals
  1. POUILabel with custom font doesn't show custom font in iOs 5 Simulator
    text
    copied!<p>I am using a custom font with UILabel. I copied the font to the Supporting files folder, added it to the info.plist, and set the font in viewDidLoad with an IBOutlet. I set the font with <code>-fontWithName:@"7 Segment" size:77.0</code>, but when I ran the app, it showed Helvetica 17 as the font. I have triple checked the name of the font, and I added an NSLog to show the name of the font the label was set to, and it showed the correct settings. But, it still showed the wrong font. I am using Xcode 4.2 on OS X Lion, with a tab bar storyboard.<br> Thanks in advance!<br> Josh The Geek</p> <p><strong>EDIT</strong><br> I used the code:</p> <pre><code>NSLog(@"%@", [self font]); for (NSString *family in [UIFont familyNames]) { for (NSString *font in [UIFont fontNamesForFamilyName:family]) { NSLog(@"%@: %@", family, font); // NSLog(@"%@", font); } } </code></pre> <p>to get a list of the fonts, and it showed <code>7 Segment: 7_Segment</code>, but when I tried to use the font <code>7_Segment</code>, it still only showed Helvetica 17. Once again, I'm out of ideas. Here's a screenshot of it trying to set a font and failing. The background is an image, the orange is the failing font. <a href="http://www.evernote.com/shard/s167/sh/a59011cf-7c41-4172-b905-dd38d48591cb/b7a111d2e5096a010eeb5fe03f711df3" rel="nofollow">http://www.evernote.com/shard/s167/sh/a59011cf-7c41-4172-b905-dd38d48591cb/b7a111d2e5096a010eeb5fe03f711df3</a></p> <p><strong>EDIT 2</strong> I tried setting it to AmericanTypewriter, and it worked, so now I know that I have the name wrong. Would someone please help find the name for the font 7 Segment (2D) from <a href="http://www.twyman.org.uk/Fonts/" rel="nofollow">http://www.twyman.org.uk/Fonts/</a> ? Like I said before, iOs told me both <code>7 Segment</code> and <code>7_Segment</code>, but neither work.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload