iOS Custom Font displaced

后端 未结 2 1436
情深已故
情深已故 2021-02-06 17:05

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 d

2条回答
  •  情书的邮戳
    2021-02-06 17:38

    Ok, now I got it :) Just look at the blogpost I linked in my question.

    http://www.andyyardley.com/2012/04/24/custom-ios-fonts-and-how-to-fix-the-vertical-position-problem/

    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)

提交回复
热议问题