iOS是否支持任何形式的位图字体在UIKit类中使用? [英] Does iOS support bitmap font in any form to use in UIKit classes?

查看:130
本文介绍了iOS是否支持任何形式的位图字体在UIKit类中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS支持任何形式的位图字体在UIKit类中使用吗?

解决方案

从iOS 3.2开始,您可以添加你喜欢的任何字体到UIKit将通过 UIAppFonts info.plist键。它不直接支持任何位图文件类型,但可以使用诸如

同样的StackOverflow问题的其他答案报告了一些成功的直接用位图数据填充TTF。您的里程可能会有所不同。

Does iOS support bitmap font in any form to use in UIKit classes?

解决方案

As of iOS 3.2, you can add any font you like to the list that UIKit will accept via the UIAppFonts info.plist key. It doesn't support any bitmap file types directly, but you can convert a bitmap font to a TTF using methods such as this one — which involves using an open source piece of software called FontForge along with a bitmap font tracer called autotrace to create (with some manual assistance) a vector description of the bitmap font.

Other answers to that same StackOverflow question report some success with populating a TTF directly with bitmap data. Your mileage may vary.

这篇关于iOS是否支持任何形式的位图字体在UIKit类中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆