Vertical metrics and line height issues with Mekkablue script

Hi guys, I’m creating a custom font for a client, and something strange happened. I noticed that the line height is basically too narrow and the letters are overlapping.
My metrics are:

  • General metrics:
    Asc: 900/16
    Cap: 700/16
    Lowercase: 550/16
    X-Height: 500/21
    LineGap: 0/-15
    Desc: -300/-16

I set the vertical metrics with the Mekkablue script:

typoAsc: 710
typoDesc: 10
typoLineGap: 0
hheaAsc: 710
hheaDesc: 10
hheaLineGap: 10
winAsc: 970
winDesc: 250

Before setting the vertical metrics, everything was working fine.
Where am I going wrong?

Thanks for any clarification. Best regards

You set the typo/hhea descender to 10, that is completely wrong.

Read this tutorial please: Vertical metrics | Glyphs

Basically, set the win metrics to cover the entire vertical space needed by your font (highest and lowest glyph).

Set the typo/hhea ascender and descender to adjust the line height, usually a good reference is using the actual descender of your font (-300) and the height of your Aacute (probably something like 950).

A good practice is also to keep the space below the baseline and above the cap height the same. SO, in your case, I would use -300 for the typo/hhea descender and 1000 (700 cap height + 300 from the value you used for your descender) for the typo/hhea ascender.

Also, set the lineGap value to 0.
Keep typo/hhea values identical.

Thanks for the clarification.

I reset typoA and hheaA to 1000 and typoD an hheaD at -300 and it works perfectly, with lineGap 0.

Regards

In case someone finds this useful, I have this script Set Vertical Metrics, which is a low-effort way to apply this Google Fonts guide, which I find most reasonable (at least for Latin). Just set the line height and how you want to center it (such as for web buttons) and it calculates the rest.

2 Likes