-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
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:
After: