Correct fraction depth and subscript placement

The fraction box added bar clearance twice to its depth, leaving extra space
below the denominator. Use the painted extent instead. Scripts now include
script space after the base, and subscripts drop by the base depth plus 2pt
rather than sitting on the baseline when the base has no depth.

Test count stays 1077.
This commit is contained in:
gloamxun committed 2026-10-28 00:43:25 +08:00
1 parent 802526c352
commit 742986e4dd
4 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -1336,7 +1336,7 @@ pub fn layout_math(atom: &MathAtom, font: &Cmr10Metrics) -> MathBox {
MathBox {
width,
height: numerator_box.height + numerator_box.depth + 2 * 65_536,
depth: denominator_box.height + denominator_box.depth + 2 * 65_536,
depth: denominator_box.height + denominator_box.depth,
}
}
}