Share packed native lists across copied boxes and shipouts

This commit is contained in:
gloamxun committed 2026-11-28 08:01:14 +08:00
1 parent ca3730338e
commit da48cf9cad
16 files changed
+157 -67

No files matched your search

@@ -45,7 +45,7 @@ impl Converter<'_> {
let metrics = g.metrics;
g.metrics.width -= id.metrics().italic(char::from(slot));
Ok(delimiter_native_box(
BoxContent::Horizontal(vec![TextNode::MathChar(super::math::math_box(g))]),
BoxContent::Horizontal(vec![TextNode::MathChar(super::math::math_box(g))].into()),
metrics.width,
metrics.height,
metrics.depth,
@@ -159,7 +159,7 @@ impl Converter<'_> {
self.reserve_delimiter_glyphs(geometry.items.len())?;
let metrics = geometry.metrics;
delimiter_native_box(
BoxContent::Horizontal(vec![TextNode::Box(super::math::math_box(geometry))]),
BoxContent::Horizontal(vec![TextNode::Box(super::math::math_box(geometry))].into()),
metrics.width, metrics.height, metrics.depth,
)
} else if let Some((id, slot)) = best {
@@ -209,7 +209,7 @@ impl Converter<'_> {
})
.collect::<Result<Vec<_>, _>>()?;
delimiter_native_box(
BoxContent::Vertical(nodes),
BoxContent::Vertical(nodes.into()),
repeat.metrics.width,
height,
extent - height,
@@ -220,7 +220,7 @@ impl Converter<'_> {
}
} else {
delimiter_native_box(
BoxContent::Horizontal(Vec::new()),
BoxContent::Horizontal(Default::default()),
self.state.parameter(Parameter::Nulldelimiterspace).width() as i64,
0,
0,