Mitchell Hashimoto 947ebc0697 font/coretext: split typographic leading equally when calculating cell height
This maybe is a robust way to get Monaspace fonts working.

Previously, we used leading as part of the calculation in cell height. I
don't remember why. It appears most popular monospace fonts (Fira Code,
Berkeley Mono, JetBrains Mono, Monaco are the few I tested) have a value
of 0 for leading, so this has no effect. But some fonts like Monaspace
have a non-zero (positive) value, resulting in overly large cell
heights.

The issue is that we simply add leading to the height, without modifying
ascent. Normally this is what you want (normal typesetting) but for
terminals, we're trying to set text centered vertically in equally
spaced grid cells. For this, we want to split the leading between the
top and bottom.
2023-11-10 21:41:49 -08:00
..
2023-11-01 19:04:20 +11:00
2023-06-30 12:15:31 -07:00
2023-10-05 08:08:04 -07:00
2023-09-24 11:22:57 -07:00
2023-06-25 11:08:20 -07:00