0

How can I increase the height of the font if it gets "cut off" from the top of the UILabel, specifically, when using non English special characters such as Č, Š or Ñ?

Zoe
  • 27,060
  • 21
  • 118
  • 148
nix_kc
  • 11
  • 3

1 Answers1

1

This answer helped me, however, it is missing a few things.

Download the Apple Font Tools and install them. Then open the Terminal, navigate to the "Fonts" folder, or open "font Book", find your font, right click to show it in the Finder, copy-paste it somewhere else and then navigate to that folder in Terminal.

Then paste this in the terminal (beware of spaces in the name of the font, put a \ in front of them):

ftxdumperfuser -t hhea -A d MyFont.ttf

This will generate a MyFont.hhea.xml file, which you can open with any text editor. Now you can modify the ascender & descender properties. If your font gets cut off at the top, then increase ascender and descender by the same amount.

When you're done editing, paste this in the terminal:

ftxdumperfuser -t hhea -A f MyFont.ttf

This will generate a new .ttf file which you can install like a normal font. Works with other font extensions as well, such as .otf.

nix_kc
  • 11
  • 3