I have a 2-master setup (Regular / Bold) which exports two different heights of the bounding box. Regular, Medium, SemiBold have the same whereas Bold has a different height (the one all should have). Vertical Metrics values for each master are identical. I attached a preview.
Any ideas? Btw, I’m still working in Glyphs 2, in case thats something resolved in Glyphs 3.
- Have you set the custom parameter set in Font Info “Use Typo Metrics”?
- Can you run the Report Highest and Lowest Glyphs mekkablue script?
Adobe apps show the selection box of the highest and least lowest glyph. The oder in the box is set by the user and by default depends on the height of the letter d.
I know, in Adobe apps the user can “control” the bounding box. The screenshot was taken in Sketch App which doesn’t have any options for the bounding box. And I see different bounding boxes in Text Edit on Mac too.
@mekkablue May I send you the file and you have a look?
By any chance, do you have a value for
hheaLineGap on the Mono Bold master?
I have found the default line spacing on Sketch to be 1.2 x the font size when
hheaLineGap is set to
0. If it is not
0, line spacing will be
(hheaAscender + hheaDescender) ÷ UPM. You will notice Sketch does not include the
hheaLineGap value in its calculations…
thanks for your reply! Regular and Bold share the exact same custom parameters for the vertical metrics. hheaLineGap in the bold master is also 0…
Thanks for the files. I cannot reproduce any special behavior in Adobe apps and in browsers. I see that TextEdit sets the Bold tighter. I assume this is a bug in CoreText.
What is with the height of the outlines in the two masters? Maybe there is something taller in the Regular?
Yes. The CoreText engine appears to make measurements in the letters and if a certain height ratio is surpassed, it appears to snap to tighter linespacing.
If I add a small path at the top of all lowercase or uppercase letters, effectively making them the same height in all masters, TextEdit keeps the line width for the Bold. It would need more reverse engineering to find out what measures are more important.
Thanks team Glyphs @mekkablue @GeorgSeifert for the help! That was it. The highest and lowest glyph of the Regular master must not be taller than the highest and lowest glyph of the Bold master! Now all bounding boxes share the same dimensions.
It is particularly letters. If the highest glyph is punctuation, it is ignored. I’m afraid TextEdit ignores the vertical metrics for the largest part of overrules them with some obscure measurements of a set of key characters. Knowing Apple, I bet there is no documentation on this.
Wait, could this be just the Agrave?! I just came across this Google Fonts guide on vertical metrics which says TextEdit will use the height of the Agrave or the
hheaAscender value (whichever is taller) for positioning the first line of text.
Source: googlefonts.github.io (item 10)
Thank you for your detective work!