Right now font-height is calculated by guesswork, which is completely unneeded given that font-size is the font's height. The guesswork approach can lead to glyphs slightly offset from centre with some fonts, e.g. Courier Prime. You can see a [http://imgur.com/yKblb0I](comparison here).
Additionally, given that we know the height of a line in pixels and the height of a glyph, the margin calculation can be much simpler.
Right now font-height is calculated by guesswork, which is completely unneeded given that font-size is the font's height. The guesswork approach can lead to glyphs slightly offset from centre with some fonts, e.g. Courier Prime. You can see a [http://imgur.com/yKblb0I](comparison here).
Additionally, given that we know the height of a line in pixels and the height of a glyph, the margin calculation can be much simpler.