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.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/crates/typst-layout/src/math/underover.rs b/crates/typst-layout/src/math/underover.rs
index 1a2c8db6..e5599638 100644
--- a/crates/typst-layout/src/math/underover.rs
+++ b/crates/typst-layout/src/math/underover.rs
@@ -1,5 +1,5 @@
use typst_library::diag::SourceResult;
-use typst_library::foundations::{Content, Packed, StyleChain};
+use typst_library::foundations::{Content, Packed, Resolve, StyleChain};
use typst_library::layout::{Abs, Em, FixedAlignment, Frame, FrameItem, Point, Size};
use typst_library::math::{
OverbraceElem, OverbracketElem, OverlineElem, OverparenElem, OvershellElem,
@@ -10,8 +10,8 @@ use typst_library::visualize::{FixedStroke, Geometry};
use typst_syntax::Span;
use super::{
- scaled_font_size, stack, style_cramped, style_for_subscript, style_for_superscript,
- FrameFragment, GlyphFragment, LeftRightAlternator, MathContext, MathRun,
+ stack, style_cramped, style_for_subscript, style_for_superscript, FrameFragment,
+ GlyphFragment, LeftRightAlternator, MathContext, MathRun,
};
const BRACE_GAP: Em = Em::new(0.25);
@@ -260,7 +260,7 @@ fn layout_underoverline(
);
ctx.push(
- FrameFragment::new(ctx, styles, frame)
+ FrameFragment::new(styles, frame)
.with_class(content_class)
.with_text_like(content_is_text_like)
.with_italics_correction(content_italics_correction),
@@ -281,11 +281,10 @@ fn layout_underoverspreader(
position: Position,
span: Span,
) -> SourceResult<()> {
- let font_size = scaled_font_size(ctx, styles);
- let gap = gap.at(font_size);
+ let gap = gap.resolve(styles);
let body = ctx.layout_into_run(body, styles)?;
let body_class = body.class();
- let body = body.into_fragment(ctx, styles);
+ let body = body.into_fragment(styles);
let glyph = GlyphFragment::new(ctx, styles, c, span);
let stretched = glyph.stretch_horizontal(ctx, body.width(), Abs::zero());
@@ -321,7 +320,7 @@ fn layout_underoverspreader(
LeftRightAlternator::Right,
None,
);
- ctx.push(FrameFragment::new(ctx, styles, frame).with_class(body_class));
+ ctx.push(FrameFragment::new(styles, frame).with_class(body_class));
Ok(())
}