summaryrefslogtreecommitdiff
path: root/crates/typst-svg/src
diff options
context:
space:
mode:
authorWenzhuo Liu <mgt@oi-wiki.org>2023-12-19 17:36:18 +0800
committerGitHub <noreply@github.com>2023-12-19 10:36:18 +0100
commit81ff34d80dac76c345c54e36b7bd203efa3be710 (patch)
treeba7baf4e08b0b3b5aac89c5ba3e90ab649453000 /crates/typst-svg/src
parent111a69f6aaf0dd470dd2319f8cff29194aa0da08 (diff)
Add stroke for text (#2970)
Diffstat (limited to 'crates/typst-svg/src')
-rw-r--r--crates/typst-svg/src/lib.rs7
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(())