diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-11-07 12:09:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-07 12:09:51 +0100 |
| commit | 241a6d9e5aa36c41e1f3be8a75a769e2ce98f7fb (patch) | |
| tree | 3c497c82ad1d19dee5b37515dea50c2868043eff /crates | |
| parent | 4d5255d9cbfb3cb7fd48feee54138fcad4f5b552 (diff) | |
Gradient Part 5b: Fix gradients in math (#2604)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/math/cancel.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/frac.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/fragment.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/matrix.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/root.rs | 2 | ||||
| -rw-r--r-- | crates/typst-library/src/math/underover.rs | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/crates/typst-library/src/math/cancel.rs b/crates/typst-library/src/math/cancel.rs index 16e4067a..455750f7 100644 --- a/crates/typst-library/src/math/cancel.rs +++ b/crates/typst-library/src/math/cancel.rs @@ -108,7 +108,7 @@ impl LayoutMath for CancelElem { let length = self.length(styles).resolve(styles); let stroke = self.stroke(styles).unwrap_or(FixedStroke { - paint: TextElem::fill_in(styles), + paint: TextElem::fill_in(styles).as_decoration(), ..Default::default() }); diff --git a/crates/typst-library/src/math/frac.rs b/crates/typst-library/src/math/frac.rs index bd8d86bf..c3014178 100644 --- a/crates/typst-library/src/math/frac.rs +++ b/crates/typst-library/src/math/frac.rs @@ -143,7 +143,7 @@ fn layout( line_pos, FrameItem::Shape( Geometry::Line(Point::with_x(line_width)).stroked(FixedStroke { - paint: TextElem::fill_in(ctx.styles()), + paint: TextElem::fill_in(ctx.styles()).as_decoration(), thickness, ..FixedStroke::default() }), diff --git a/crates/typst-library/src/math/fragment.rs b/crates/typst-library/src/math/fragment.rs index a40ed2bf..76ee2512 100644 --- a/crates/typst-library/src/math/fragment.rs +++ b/crates/typst-library/src/math/fragment.rs @@ -225,7 +225,7 @@ impl GlyphFragment { c, font: ctx.font.clone(), lang: TextElem::lang_in(ctx.styles()), - fill: TextElem::fill_in(ctx.styles()), + fill: TextElem::fill_in(ctx.styles()).as_decoration(), shift: TextElem::baseline_in(ctx.styles()), style: ctx.style, font_size: ctx.size, diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index b54da5d6..4142d235 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -397,7 +397,7 @@ fn layout_mat_body( let default_stroke_thickness = DEFAULT_STROKE_THICKNESS.scaled(ctx); let default_stroke = FixedStroke { thickness: default_stroke_thickness, - paint: TextElem::fill_in(ctx.styles()), + paint: TextElem::fill_in(ctx.styles()).as_decoration(), line_cap: LineCap::Square, ..Default::default() }; diff --git a/crates/typst-library/src/math/root.rs b/crates/typst-library/src/math/root.rs index 13c5c147..ba918ea9 100644 --- a/crates/typst-library/src/math/root.rs +++ b/crates/typst-library/src/math/root.rs @@ -122,7 +122,7 @@ fn layout( line_pos, FrameItem::Shape( Geometry::Line(Point::with_x(radicand.width())).stroked(FixedStroke { - paint: TextElem::fill_in(ctx.styles()), + paint: TextElem::fill_in(ctx.styles()).as_decoration(), thickness, ..FixedStroke::default() }), diff --git a/crates/typst-library/src/math/underover.rs b/crates/typst-library/src/math/underover.rs index aeb83061..6fc76830 100644 --- a/crates/typst-library/src/math/underover.rs +++ b/crates/typst-library/src/math/underover.rs @@ -96,7 +96,7 @@ fn layout_underoverline( line_pos, FrameItem::Shape( Geometry::Line(Point::with_x(width)).stroked(FixedStroke { - paint: TextElem::fill_in(ctx.styles()), + paint: TextElem::fill_in(ctx.styles()).as_decoration(), thickness: bar_height, ..FixedStroke::default() }), |
