summaryrefslogtreecommitdiff
path: root/crates/typst-layout/src/math/underover.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-layout/src/math/underover.rs')
-rw-r--r--crates/typst-layout/src/math/underover.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/typst-layout/src/math/underover.rs b/crates/typst-layout/src/math/underover.rs
index a24113c8..c29d9947 100644
--- a/crates/typst-layout/src/math/underover.rs
+++ b/crates/typst-layout/src/math/underover.rs
@@ -285,14 +285,14 @@ fn layout_underoverspreader(
let body = ctx.layout_into_run(body, styles)?;
let body_class = body.class();
let body = body.into_fragment(styles);
- let glyph = GlyphFragment::new(ctx, styles, c, span);
- let stretched = glyph.stretch_horizontal(ctx, body.width());
+ let mut glyph = GlyphFragment::new_char(ctx.font, styles, c, span)?;
+ glyph.stretch_horizontal(ctx, body.width());
let mut rows = vec![];
let baseline = match position {
Position::Under => {
rows.push(MathRun::new(vec![body]));
- rows.push(stretched.into());
+ rows.push(glyph.into());
if let Some(annotation) = annotation {
let under_style = style_for_subscript(styles);
let annotation_styles = styles.chain(&under_style);
@@ -306,7 +306,7 @@ fn layout_underoverspreader(
let annotation_styles = styles.chain(&over_style);
rows.extend(ctx.layout_into_run(annotation, annotation_styles)?.rows());
}
- rows.push(stretched.into());
+ rows.push(glyph.into());
rows.push(MathRun::new(vec![body]));
rows.len() - 1
}