diff --git a/crates/typst-pdf/src/shape.rs b/crates/typst-pdf/src/shape.rs index a4b487e17..8bbf98bf8 100644 --- a/crates/typst-pdf/src/shape.rs +++ b/crates/typst-pdf/src/shape.rs @@ -56,9 +56,12 @@ pub(crate) fn handle_shape( None }; - surface.set_fill(fill); - surface.set_stroke(stroke); - surface.draw_path(&path); + // Otherwise, krilla will by default fill with a black paint. + if fill.is_some() || stroke.is_some() { + surface.set_fill(fill); + surface.set_stroke(stroke); + surface.draw_path(&path); + } } surface.pop();