问题描述
我必须做些什么来获得具有自定义字体的UIFont对象?我记得Info.plist文件中还有一些内容。
支持什么样的字体文件格式?
它支持TTF和OpenType字体。一个需要注意的是,它加载和分析应用程序启动时的所有字体,所以它会减缓初始加载时间。
我相信这只适用于iOS 3.2或更高版本。
What must I do to get an UIFont object with a custom font? I remember there was also something going on in the Info.plist file.
What font file formats are supported?
To add a custom font to your application, you can add them to the XCode project. Then, modify the application-info.plist file. Add the key "Fonts provided by application" to a new row. Add one item for each font you have added.
It supports TTF and OpenType fonts both. One caveat is that it loads and parses all fonts in the startup of your app, so it will slow down the initial load time.
I believe this is only available in iOS 3.2 or later.
这篇关于如何将自定义字体添加到iPhone应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!