diff options
| author | LU Jialin <luxxxlucy@gmail.com> | 2023-10-02 22:22:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-02 16:22:33 +0200 |
| commit | 34ebbaeb1082b82b4f38d0b8da9a07675127ed79 (patch) | |
| tree | d2e1c74d2abc1754d43be25cb6ddf9f134962ca4 | |
| parent | 07e3fde54cdb8764077c789a15858ad1de468d32 (diff) | |
Passing color to the augment line in matrix (#2281)
| -rw-r--r-- | crates/typst-library/src/math/matrix.rs | 1 | ||||
| -rw-r--r-- | tests/ref/bugs/mat-aug-color.png | bin | 0 -> 1680 bytes | |||
| -rw-r--r-- | tests/typ/bugs/mat-aug-color.typ | 9 |
3 files changed, 10 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 00000000..d6ab0239 --- /dev/null +++ b/tests/ref/bugs/mat-aug-color.png 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)$ |
