开发者

uilabel custom font?

开发者 https://www.devze.com 2023-04-05 15:52 出处:网络
I searched for a way to add my custom font to iphone app and I was successful in some cases. but in my case I want to import \"Helvetica Condensed Black\" which in the Helvetica family but it is neith

I searched for a way to add my custom font to iphone app and I was successful in some cases. but in my case I want to import "Helvetica Condensed Black" which in the Helvetica family but it is neither mac's native nor iPhone's.

when I open the font in the finder I find a file named : "Helv Condensed" with no extension. I went through and added this file to my resources and also to plist. the same way that I did with the other font which had .tff extension and it was a successful attempt.

so question is how should I add this font which is in helvetica font family 开发者_如何转开发but not iphone native to my application. Also is there any way to add these fonts to interface builder?

thank you.


You have to add it to the UIAppFonts key in your app's info.plist, and then you can use it in code, you can't add it to Interface Builder directly.

I found this post quite helpful Can I embed a custom font in an iPhone application?

0

精彩评论

暂无评论...
验证码 换一张
取 消