iOS 字体和(据称)额外行距
最近的一个项目要求在 iOS 4.x 上使用两种 Hiragino 字体(HiraKakuProN-W3 和 -W6)...但它们似乎有一些额外的空间(至少在字符 A-Za-z0-9 下方,这就是我最终使用它们的目的)。这会导致所有文本倾斜得有点高。
例如,在 UINavigationBar 的自定义标题视图中,或者在 UITableViewCell 的文本或详细信息标签中,文本下方有额外的空间,因此它不会像您通常期望的那样与其他所有内容“对齐”。
也许这是设计好的,并且是对 Hiragino 字体的滥用。但是,如果不是,我是否应该做其他事情,以便字体垂直对齐而不会产生混乱/大惊小怪?目前尚不清楚如何在常见情况下有效地使用这些其他字体......除非我别无选择,只能坚持使用经过验证的真实系统字体。 (但是为什么首先要提供字体......!)
FWIW,我还尝试了一些我们使用的许可字体,Gotham Rounded Book 和 Gotham Rounded Bold。同样的问题。
A recent project has called for the use of two Hiragino fonts on iOS 4.x (HiraKakuProN-W3 and -W6) ... but they appear to have some extra space (at least below the characters A-Za-z0-9, which is what I would end up using them for). That leads to all the text skewing a bit high.
For instance, in a UINavigationBar's custom title view, or in the text or detail label of a UITableViewCell, there's extra space below the text, and so it doesn't "line up" with everything else as you'd normally expect.
Perhaps this is as-designed, and is a misuse of the Hiragino font. If it isn't, however, is there something else I should be doing so that the font aligns vertically with little muss/fuss? It's not clear how to use these other fonts effectively in common situations ... unless I have no choice but to stick with tried and true system fonts. (But then why offer the fonts in the first place ... !)
FWIW, I also tried a few licensed-for-our-use fonts, Gotham Rounded Book and Gotham Rounded Bold. Same problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好消息:Kevin Ballard 的 FontLabel 似乎可以驯服我扔给它的任何字体。谢谢,凯文!将更详细地研究课程,但从表面上看,它看起来像是赢家。
Good news: Kevin Ballard's FontLabel appears to tame just about any font I throw at it. Thanks, Kevin! Will study the classes in more detail, but on the surface it looks like a winner.