xcode iOS 4.2 SDK 是否支持自定义字体?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4943879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does iOS 4.2 SDK supports custom fonts?
提问by Kineticmind
I've been trying to use custom fonts on the XCode with 4.2 SDK, using this method:
我一直在尝试使用以下方法在带有 4.2 SDK 的 XCode 上使用自定义字体:
http://tetontech.wordpress.com/2010/09/03/using-custom-fonts-in-your-ios-application/
http://tetontech.wordpress.com/2010/09/03/using-custom-fonts-in-your-ios-application/
Although technically I'm sure I did everything right, the simulator didn't display the font.
虽然从技术上讲我确信我做的一切都是正确的,但模拟器没有显示字体。
Makes me wonder whether this feature is still supported in the latest SDK, since all those tutorials use previous SDKs. Someone from the Titanium forum also complained about the same thing.
让我怀疑最新的 SDK 是否仍然支持此功能,因为所有这些教程都使用以前的 SDK。Titanium 论坛上也有人抱怨同样的事情。
Anyone had success using custom fonts on 4.2?
有人在 4.2 上成功使用自定义字体吗?
回答by Joseph Tura
The short answer: yes it does. Yes, I have. So maybe you did overlook something?
简短的回答:是的。是的,我有。所以也许你确实忽略了一些东西?
Where exactly are you trying to use your font? Have you tried [UIFont fontWithName:@"bla"]
? Or are you trying to specifically display it in HTML?
你到底想在哪里使用你的字体?你试过[UIFont fontWithName:@"bla"]
吗?或者你想专门用 HTML 显示它?