diff options
| author | Wenzhuo Liu <mgt@oi-wiki.org> | 2023-12-19 17:36:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-19 10:36:18 +0100 |
| commit | 81ff34d80dac76c345c54e36b7bd203efa3be710 (patch) | |
| tree | ba7baf4e08b0b3b5aac89c5ba3e90ab649453000 /crates/typst-svg/src | |
| parent | 111a69f6aaf0dd470dd2319f8cff29194aa0da08 (diff) | |
Add stroke for text (#2970)
Diffstat (limited to 'crates/typst-svg/src')
| -rw-r--r-- | crates/typst-svg/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/typst-svg/src/lib.rs b/crates/typst-svg/src/lib.rs index 92168fc6..b8143122 100644 --- a/crates/typst-svg/src/lib.rs +++ b/crates/typst-svg/src/lib.rs @@ -452,6 +452,13 @@ impl SVGRenderer { Size::new(Abs::pt(width), Abs::pt(height)), self.text_paint_transform(state, &text.fill), ); + if let Some(stroke) = &text.stroke { + self.write_stroke( + stroke, + Size::new(Abs::pt(width), Abs::pt(height)), + self.text_paint_transform(state, &stroke.paint), + ); + } self.xml.end_element(); Some(()) |
