Collapsed font heights
When playing around with the MathJax fonts found in ts/output/chtml/fonts/tex-woff-v2, I noticed that the height of the text that this font produces is collapsed, i.e. it doesn't have the full height.
Example:
These are just two <div>s with the texts "01234567890" and "xyz" and MathJax_Main-Regular.woff and MathJax_Main-Italic.woff, with no further modifications other than their font-size scaled up.
Was this a conscious decision? If so, what's the motivation behind it?
Yes, this is by design. The MathJax fonts are intended for use within MathJax for laying out mathematics, and are not designed for use as text fonts. The reason for this unusual ascent/descent setup is so that when used with line-height equal to 0 (as in MathJax's layout), the fonts align on their baselines. This is achieved by having their ascent and descent being equal. Ideally, both would have been zero, but some browsers had trouble with that, so they have a small ascent and descent. This makes it easier to place the characters in a two-dimensional layout, for things like superscripts and subscript, accents, limits on summations, fractions, etc. MathJax also needs to make each character have its correct height and depth rather than the height and depth of the font as a whole, and so CSS padding is used to set the height and depth (and width) from the baseline, which is easiest to do when the ascent and decent are zero, as is the case with line-height of zero when the ascent and decent are equal.
The fonts in v4 handle this in a different way, but in v3 the fonts were set to have equal ascent and decent.
How specifically will this change in v4? I already read about the switch to Latin Modern in mathjax/MathJax-src#973.
The fonts all have their natural ascent and descent values, except for one that is used to force the ascent/descent to be equal when it is used as the first font in a list of fonts in font-family CSS declarations.