问题描述
对于一个项目,我买了一个 OTF
字体并将其包含在我的项目中(添加到plist文件等)。它可以工作,我可以在我的按钮上设置字体,但标签被取代。我添加了截图,以便您查看我的问题。任何人都知道问题是什么?
系统:iOS 3测试版的iOS 3测试版,但iOS 5.1.1上存在相同问题
编辑:
我发现了一条关于这个问题的帖子。
好的,现在我明白了:)看看我在问题中链接的博客帖子。
摘要:
For a project I bought a OTF
font and included it into my project (with adding to plist file etc). It works and I can set the font on my buttons, but the label is displaced then. I added a screenshot so you can see my issue. Anyone an idea what the problem can be?
system: iPad 3 with iOS 6.0 beta, but same problem on iOS 5.1.1
EDIT:
I found a post about the problem.
http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/
Ok, now I got it :) Just look at the blogpost I linked in my question.
summary:
- Download the Apple Font Tool Suite
- Terminal: ftxdumperfuser -t hhea -A d font.ttf
- XML file created in the directory
- Open XML with Text Editor and adjust the settings of ascender, descender
- Terminal:ftxdumperfuser -t hhea -A f font.ttf
- Add custom font to your projekt(dont forget plist item)
这篇关于iOS自定义字体位移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!