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

[80_6] Improving Radical Box Typesetting #2118

Merged
merged 7 commits into from
Oct 13, 2024
Merged

Conversation

KeShih
Copy link
Contributor

@KeShih KeShih commented Sep 30, 2024

What

Improving Fraction Box Typesetting.

Why

For some opentype math font, math table gives more precise information about typesetting radical.

How to test your changes?

Open devel/80_6.tmu.

It is evident that the Asana Math and Fira Math opentype fonts have undergone changes, with significant adjustments in the spacing and positioning before and after the degree symbol. In contrast, the latter two hardcoded opentype fonts have remained unchanged.

Before:
image

After:
image

@KeShih KeShih marked this pull request as ready for review October 6, 2024 11:21
Copy link
Contributor

@da-liii da-liii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Y+= fn->sqrt_degree_rise_percent * sqrtb->h () / 100;
M = fn->sqrt_kern_after_degree;
sep= 0;
b2->x1-= fn->sqrt_kern_before_degree;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit confused on this parameter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenType math table requires spacing both before and after the degree symbol. In the case of b2->x1, the front spacing is added, while M represents the distance from the back of the symbol to the radical. According to the specification, the height of the degree symbol is raised by a fixed proportion of the height of the radical.

@da-liii
Copy link
Contributor

da-liii commented Oct 6, 2024

image

The rule of the radical box rendered in Fira Math font should be fixed

@@ -109,6 +109,13 @@ font_rep::copy_math_pars (font fn) {
frac_denom_disp_shift_down = fn->frac_denom_disp_shift_down;
frac_denom_gap_min = fn->frac_denom_gap_min;
frac_denom_disp_gap_min = fn->frac_denom_disp_gap_min;
sqrt_ver_gap = fn->sqrt_ver_gap;
sqrt_ver_disp_gap = fn->sqrt_ver_disp_gap;
sqrt_rule_thickness = fn->sqrt_rule_thickness;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

@KeShih KeShih merged commit 3e4db46 into XmacsLabs:branch-1.2 Oct 13, 2024
7 checks passed
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.

2 participants