1

I've added the custom font "Helvetica-Condensed-Bold.otf" (font family Helvetica, font name Helvetica-Condensed-Bold) to my iOS app using the UIAppFonts Info.plist key. As expected, this font is used when I do the following:

someLabel.font = [UIFont fontWithName:@"Helvetica-Condensed-Bold" size:28.0];

But unlike what I expected, and unlike how this is supposed to work, this font is now also used in a bunch of places where I didn't want it to be, like in UIButtons and UILabels other than this one. In the iPhone Simulator, the font is even used in iOS's own status bar.

Would anyone of you know how to resolve this problem: to have to custom font only be used where I specifically say it should be?

Douwe Maan
  • 6,888
  • 2
  • 34
  • 35

2 Answers2

0

I had to use this font and I came upon this question. It looks like Helvetica Condensed Bold has been available since iOS 5.0 (http://iosfonts.com.)

I used

[UIFont fontWithName:@"HelveticaNeue-CondensedBold" size:12.0];
Atanas Chanev
  • 192
  • 1
  • 5
0

Let's try some troubleshooting. Pick a different font and see if you have the same issue. Also, try renaming Helvetica-Condensed-Bold to something else (say HelveticaCondensedBold).

  • Will try with another font in a couple of hours, when I get home. Renaming the file won't do anything, as it has no effect on either the font family or the name: those are defined inside the file itself. The string to use in `fontWithName:size:` is NOT the filename, but the font name. – Douwe Maan May 30 '11 at 11:33
  • 1
    What we ended up doing is finding a different copy of basically the same font, with a slightly modified font family that didn't exist on the iPhone yet. It appears that iOS doesn't like new fonts added to existing font families, but as this family didn't exist yet, it worked perfectly. – Douwe Maan Jun 10 '11 at 23:09