diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index dd30209a..68f7f438 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -378,6 +378,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()), line_cap: LineCap::Square, ..Default::default() }; diff --git a/tests/ref/bugs/mat-aug-color.png b/tests/ref/bugs/mat-aug-color.png new file mode 100644 index 00000000..d6ab0239 Binary files /dev/null and b/tests/ref/bugs/mat-aug-color.png differ diff --git a/tests/typ/bugs/mat-aug-color.typ b/tests/typ/bugs/mat-aug-color.typ new file mode 100644 index 00000000..c2e617d6 --- /dev/null +++ b/tests/typ/bugs/mat-aug-color.typ @@ -0,0 +1,9 @@ +// https://github.com/typst/typst/issues/2268 +// The augment line should be of the same color as the text +#set text( + font: "New Computer Modern", + lang: "en", + fill: yellow, +) + +$mat(augment: #1, M, v) arrow.r.squiggly mat(augment: #1, R, b)$