在我的 iPhone 应用中,
In my iPhone app,
我已经包含了两种自定义字体,并通过stackoverflow问题引用了这个步骤......
I have included two custom fonts and by referring this steps by stackoverflow questions....
如何在 iPhone 中包含和使用新字体SDK?
并编码....
[lbl setFont:[UIFont fontWithName:@"glyphish.ttf" size:[lbl minimumFontSize]]];
我正在为 Base SDK 5.0 构建此应用
I am building this app for Base SDK 5.0
答案是,
[lbl setFont:[UIFont fontWithName:@"glyphish" size:[lbl minimumFontSize]]];
谢谢大家.
您传递了一个文件名 (glyphish.ttf) 而不是实际的字体名称.最有可能的是,字体名称是 Glyphish,但您需要以某种方式查询它:使用 Mac 的Font Book.app"或通过代码:首先,您需要通过 [UIFont familyNames].然后,使用 [UIFont fontNamesForFamilyName:] 获取要加载的实际字体名称.例如,如果您的字体包含粗体变体,其系列名称将是 Glyphish,但字体名称可能是 Glyphish-Bold.
You have passed a filename (glyphish.ttf) instead of the actual font name. Most likely, the font name is Glyphish, but you need to query it somehow: either using the Mac's "Font Book.app" or via code: first, you need to query the family names via [UIFont familyNames]. Then, use [UIFont fontNamesForFamilyName:] to get the actual font names to load. For example, if your font contains a bold variant its family name would be Glyphish but font name would likely be Glyphish-Bold.
这篇关于自定义字体在我的应用程序中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何通过点击动画 UIImageview 以显示全屏?How to animate a UIImageview to display fullscreen by tapping on it?(如何通过点击动画 UIImageview 以显示全屏?)
停止 segue 并显示警报To stop segue and show alert(停止 segue 并显示警报)
iOS 5 故事板,以编程方式确定路径iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以编程方式确定路径)
UIProgressView 和自定义跟踪和进度图像(iOS 5 属性UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定义跟踪和进度图像(iOS 5 属性))
语义问题:属性的合成 getter 遵循 Cocoa 命名约定以Semantic Issue: Property#39;s synthesized getter follows Cocoa naming convention for returning #39;owned#39; objects(语义问题:属性的合成 gette
试图在视图控制器之间传递数据Trying to pass data between viewControllers(试图在视图控制器之间传递数据)