Skip to content

Commit

Permalink
improve line wide and deprecate left kern
Browse files Browse the repository at this point in the history
  • Loading branch information
KeShih committed Oct 13, 2024
1 parent 51ff998 commit 5b8f7e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Typeset/Boxes/Composite/math_boxes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ sqrt_box_rep::sqrt_box_rep (path ip, box b1, box b2, box sqrtb, font fn2,
SI by= sqrtb->y2 + dy;
if (sqrtb->x2 - sqrtb->x4 > wline) dx-= (sqrtb->x2 - sqrtb->x4);

pencil rpen= pen->set_width (wline);
insert (b1, 0, 0);
bool use_open_type= (fn->math_type == MATH_TYPE_OPENTYPE) &&
(fn->sqrt_degree_rise_percent > 0);
pencil rpen= use_open_type ? pen->set_width (fn->sqrt_rule_thickness)
: pen->set_width (wline);
insert (b1, 0, 0);
if (!is_nil (b2)) {
SI X = -sqrtb->w ();
SI M = X / 3;
Expand All @@ -197,7 +198,8 @@ sqrt_box_rep::sqrt_box_rep (path ip, box b1, box b2, box sqrtb, font fn2,
Y+= fn->sqrt_degree_rise_percent * sqrtb->h () / 100;
M = fn->sqrt_kern_after_degree;
sep= 0;
b2->x1-= fn->sqrt_kern_before_degree;
// we don't use it because it looks out of harmony
// b2->x1-= fn->sqrt_kern_before_degree;
}
else {
if (bh < 3 * bw) Y+= bh >> 1;
Expand Down

0 comments on commit 5b8f7e4

Please sign in to comment.