Stack substack rows with TeX inter-row gaps
This commit is contained in:
1 parent
0b611b6b1e
commit
8686b9a35e
6 files changed
+80
-12
No files matched your search
@@ -1205,9 +1205,13 @@ impl Page {
|
||||
}
|
||||
}
|
||||
MathAtom::StackLines(lines) => {
|
||||
let height = 12 * 65_536;
|
||||
let layout = crate::math::stack_layout(lines, font);
|
||||
let scale = |value: i64| value.saturating_mul(size) / 655_360;
|
||||
for (index, line) in lines.iter().enumerate() {
|
||||
Self::paint_math(line, font, x, baseline + index as i64 * height, size, list);
|
||||
let box_ = &layout.boxes[index];
|
||||
let row_x = x + scale((layout.width - box_.width).max(0)) / 2;
|
||||
let row_y = baseline + scale(layout.offsets[index]);
|
||||
Self::paint_math(line, font, row_x, row_y, size, list);
|
||||
}
|
||||
}
|
||||
MathAtom::Stack { top, base, above } => {
|
||||
|
||||
Reference in new issue
Block a user