对于一个项目我买了一个OTF
字体并将其包含到我的项目中(添加到 plist 文件等)。它有效,我可以在按钮上设置字体,但标签会被替换。我添加了屏幕截图,以便您可以看到我的问题。有人知道问题出在哪里吗?
系统:iPad 3,iOS 6.0 beta,但在 iOS 5.1.1 上有同样的问题
EDIT:
我找到了一个关于这个问题的帖子。
http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/ http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/
好的,现在我明白了:)只需看看我在问题中链接的博文即可。
http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/ http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/
summary:
- 下载 Apple 字体工具套件
- 终端:ftxdumperfuser -t hhea -A d font.ttf
- 在目录中创建 XML 文件
- 用文本编辑器打开XML并调整上升、下降的设置
- 终端:ftxdumperfuser -t hhea -A f font.ttf
- 将自定义字体添加到您的项目中(不要忘记 plist 项目)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)