Skip to content
Snippets Groups Projects
Commit d2c353b9 authored by Luigi Scarso's avatar Luigi Scarso
Browse files

add italic correction in otfmath font when nuclues is mathchar and following...

add italic correction in otfmath font when nuclues is mathchar and following is not nil and no scripts (HH)
parent 795b2e76
No related branches found
No related tags found
No related merge requests found
......@@ -2186,6 +2186,7 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c, int fl
scaled w; /* width of the accentee, not including sub/superscripts */
boolean s_is_absolute; /* will be true if a top-accent is placed in |s| */
scaled fraction ;
scaled ic = 0;
scaled target ;
extinfo *ext;
pointer attr_p;
......@@ -2277,6 +2278,12 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c, int fl
delta = delta + height(x) - h;
h = height(x);
}
} else if ((vlink(q) != null) && (type(nucleus(q)) == math_char_node)) {
/* only pure math char nodes */
internal_font_number f = fam_fnt(math_fam(nucleus(q)),cur_size);
if (is_new_mathfont(f)) {
ic = char_italic(f,math_character(nucleus(q)));
}
}
/* the top accents of both characters are aligned */
if (s_is_absolute) {
......@@ -2340,6 +2347,10 @@ static void do_make_math_accent(pointer q, internal_font_number f, int c, int fl
} else {
shift_amount(y) = -(h - height(y));
}
if (ic != 0) {
/* old font codepath has ic built in, new font code doesn't */
width(r) += ic ;
}
math_list(nucleus(q)) = y;
type(nucleus(q)) = sub_box_node;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment