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 UIButton
s and UILabel
s 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?
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).
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];
精彩评论