This is a follow-up to 758de957.
- unify the metrics and drawing of \sqrt and \root using helper
functions mathed_root_metrics and mathed_draw_root.
- compute the vertical spacing above the nucleus of the root following
rule 11 of the TeXbook. In particular, it is different in inline and
display style.
- draw the root glyph without hard-coded pixel values. Make the line
width depend on the zoom.
more work is needed to implement properly rule 11:
- Ideally, we should use sqrt glyphs from the math fonts. Note that
then we would get rule thickness from there.
- The positioning of the root MathData is arbitrary. It should
follow the definition of \root...\of... in The Texbook in
Apprendix B page 360.
Fixes bug #10814.
(cherry picked from commit 16af6e7c50)
(cherry picked from commit 6cb6f78ae9)
Now the helper class contains logic that checks whether buffer are
known before closing them. This avoids potential crashes.
Use it in different places to siplify code. It is not clear at this
point whether it should be used everywhere.
Followup to bug #10847.
(cherry picked from commit cd9e42dc35)
The correct behavior is to go to position 0 going up from first row,
and to end of row when going down on last row.
The targetx value of the cursor is not updated, which makes cursor
movement more natural.
Fixes bug #10701.
(cherry picked from commit 34285cc683)