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

Vertically center integral.size1 #559

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tmke8
Copy link

@tmke8 tmke8 commented Oct 8, 2024

Closes #542

I used this script to center it. The script seems to have moved it down by 308. It looks correct to me, but I may be wrong.

I also don't know whether I need to change hinting somewhere? I didn't see anything obvious in the .sfd file.

This also seems to center all the other large integral glyphs (including the ss08 glyphs) because they all refer to integral.size1.

@khaledhosny
Copy link
Contributor

If we are going to do this, you have to check all big operators not just integral. It should also be centered around math axis.

@tmke8
Copy link
Author

tmke8 commented Oct 9, 2024

I modified the script to center around the math axis:

startglyph = 1114441
endglyph = 1114441  

thisfont =  fontforge.activeFont()  
for i in range(startglyph,endglyph+1):  
    ytop = thisfont[i].boundingBox()[-1] # counted from baseline, excluding descent!  
    ybot = thisfont[i].boundingBox()[1] # same note as above
    # Calculation method:
    # Current midpoint of glyph (counted from baseline) = (ytop + ybot) / 2
    translation = thisfont.math.AxisHeight - ((ytop + ybot) / 2)
    thisfont[i].transform( psMat.translate( 0, translation ))

The difference to before is 6 coordinate points.

I also investigated the other big operators (those with .size1 suffix in their name), but they all look centered to me:

image

Produced with this latex snippet, rendered on Temml.org

\begin{aligned}
&\cdot\int\iint\iiint\iiiint\oint\oiint\oiiint\intclockwise\varointclockwise\sum\prod\coprod \cdot\\
&\cdot\bigwedge\bigvee\bigcap\bigcup\bigcupdot\biguplus\bigsqcap\bigsqcup\cdot\bigodot\bigoplus\bigotimes\surd\Big(\Big)\Big\lceil\Big\rceil\Big\langle\Big\rangle\cdot
\end{aligned}

I could nevertheless run the script over these?

@khaledhosny
Copy link
Contributor

I also investigated the other big operators (those with .size1 suffix in their name), but they all look centered to me:

image

But the image shows that all integrals are not centered. You should also center the text version of the big operators (the radical and parentheses are not big operators so can be left alone).

@tmke8
Copy link
Author

tmke8 commented Oct 11, 2024

But the image shows that all integrals are not centered.

Yes... I guess I wanted to demonstrate the problem again.

Here it is with the patched font:

image

You should also center the text version of the big operators

You mean the glyphs without .sizeX? Okay, I'll investigate.

@tmke8
Copy link
Author

tmke8 commented Oct 11, 2024

Oh, looking at the new image, I see that the circles are too high! I'll fix it.

@tmke8
Copy link
Author

tmke8 commented Oct 11, 2024

Should be fixed now:

image

And also for the slanted integrals:

image

@khaledhosny
Copy link
Contributor

I haven’t checked the font files, but the screenshot looks good to me.

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 this pull request may close these issues.

low baseline in Libertinus Math /integral.size1
2 participants