alerque / libertinus

The Libertinus font family
Other
927 stars 57 forks source link

low baseline in Libertinus Math /integral.size1 #542

Open damaxwell opened 11 months ago

damaxwell commented 11 months ago

Howdy. This may or may not be a bug; I'm seeking clarification.

The baseline for /integral.size1 is low:

image

In practice in many applications, this doesn't matter. TeX and friends encode an integral as a class 1 symbol (a large operator) and typeset it centered on the math axis when doing math layout. MS Word appears to do the same thing. So the output from these engines looks reasonable:

image

I was contributing recently to the math layout engine in Typst, which until now has relied on the baseline for large operators. By and large, math fonts seem to set those baselines so that the large operators are centered on the axis. The Libertinus Math /intergral.size1 glyph seems to be exceptional in this regard, and this led to suboptimal typesetting when the baseline was relied on.

image

I'm filing this bug report to enquire if the low baseline is a bug. It may be that there is some other context where this baseline is desired. Or maybe the baseline is simply deemed unimportant since TeX et. al. and MS Word clobber it anyway and its current value is maybe accidental. Or maybe the baseline is an expression of what is actually desired for typesetting, though that seems unlikely. Is there a reason the baseline for this glyph is not set such that the glyph is centered on the math axis? Thanks!

khaledhosny commented 7 months ago

Big operators should always be centered around math axis, the glyph’s base line in the font is irrelevant. There is no strong reason to have it the way it is in Libertinus, though (may be other than helping catch implementation bugs).