Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

low baseline in Libertinus Math /integral.size1 #542

Open
damaxwell opened this issue Jul 18, 2023 · 3 comments · May be fixed by #559
Open

low baseline in Libertinus Math /integral.size1 #542

damaxwell opened this issue Jul 18, 2023 · 3 comments · May be fixed by #559

Comments

@damaxwell
Copy link

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
Copy link
Contributor

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).

@tmke8
Copy link

tmke8 commented Oct 8, 2024

I also noticed this when using Libertinus Math with MathML in Chrome:

image

(see https://temml.org/#%5Cprod%20x%5Cint%20x%20%5Csum%20x and set the font to "Libertinus")

Firefox does it correctly though, so I suppose this can be considered a bug in Chrome.

Nevertheless, would you object to a PR to change the baseline of the integral?

@tmke8 tmke8 linked a pull request Oct 8, 2024 that will close this issue
@tmke8
Copy link

tmke8 commented Oct 8, 2024

I opened a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants