diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-10-03 19:31:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 19:31:02 +0200 |
| commit | a4e357fb37d76d32d06ad8cc21e47bb2cc064cfd (patch) | |
| tree | 52e118513218d961cc5e8c713575049cd75a2e95 /crates/typst-library/src/math/attach.rs | |
| parent | 6b1233e127d815b38fea9ab909dd4081cdf76ca2 (diff) | |
Gradient Part 2 - Linear gradients (#2279)
Diffstat (limited to 'crates/typst-library/src/math/attach.rs')
| -rw-r--r-- | crates/typst-library/src/math/attach.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-library/src/math/attach.rs b/crates/typst-library/src/math/attach.rs index c33b58e4..5d1e477e 100644 --- a/crates/typst-library/src/math/attach.rs +++ b/crates/typst-library/src/math/attach.rs @@ -106,7 +106,7 @@ impl LayoutMath for PrimesElem { // Custom amount of primes let prime = ctx.layout_fragment(&TextElem::packed('′'))?.into_frame(); let width = prime.width() * (count + 1) as f64 / 2.0; - let mut frame = Frame::new(Size::new(width, prime.height())); + let mut frame = Frame::soft(Size::new(width, prime.height())); frame.set_baseline(prime.ascent()); for i in 0..count { @@ -260,7 +260,7 @@ fn layout_attachments( return Ok(()); } - let mut frame = Frame::new(Size::new( + let mut frame = Frame::soft(Size::new( pre_width_max + base_width + post_max_width + scaled!(ctx, space_after_script), ascent + descent, )); @@ -331,7 +331,7 @@ fn attach_top_and_bottom( let base_pos = Point::new((width - base.width()) / 2.0, base_offset); let delta = base.italics_correction() / 2.0; - let mut frame = Frame::new(Size::new(width, height)); + let mut frame = Frame::soft(Size::new(width, height)); frame.set_baseline(base_pos.y + base.ascent()); frame.push_frame(base_pos, base.into_frame()); |
