代码之家  ›  专栏  ›  技术社区  ›  iForests

iOS-HelveticaNeueTSTd LtCn垂直对齐

  •  0
  • iForests  · 技术社区  · 12 年前

    我在我的iPhone应用程序中使用了一种名为HelveticaNeueLTStd LtCn的字体, 但我发现那个字体的垂直排列很奇怪。文本下方有填充:

    enter image description here

    结果是表视图单元格的底部填充大于顶部填充。我能做什么?谢谢

    2 回复  |  直到 12 年前
        1
  •  0
  •   situee    12 年前

    请检查此帖子以修复它 http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/

    1.下载并安装“苹果字体工具套件”

    2.生成字体设置xml文件

    ftxdumperfuser -t hhea -A d font.ttf
    

    3.在输出xml中更改以下“上升器”和“下降器”设置。

    ascender="975"
    descender="-227"
    

    4.通过以下方式调整字体文件

    ftxdumperfuser -t hhea -A f font.ttf
    

    您的字体文件将垂直居中。

        2
  •  0
  •   iForests    12 年前

    我通过使用自己的单元格并向下移动标签来解决这个问题。