Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e034863

Browse files
committed
Manipulate depth instead of adding space
[skip ci]
1 parent a297330 commit e034863

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/_mathtext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,10 +2957,10 @@ def underline(self, toks: ParseResults) -> T.Any:
29572957
Hlist([body]),
29582958
Kern(3 * thickness),
29592959
Hrule(state, thickness),
2960-
Kern(thickness),
29612960
])
2962-
# Make `body` rest on the baseline as it would without the underline.
2963-
vlist.shift_amount = 5 * thickness + body.depth + body.shift_amount
2961+
delta = vlist.height + vlist.depth + thickness
2962+
vlist.height = body.height
2963+
vlist.depth = delta - vlist.height
29642964
return [Hlist([vlist])]
29652965

29662966
def _auto_sized_delimiter(self, front: str,

0 commit comments

Comments
 (0)