From 95304ad7f637a8b996a6ff90a8f685c92bd62cbf Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 13 Oct 2026 10:29:47 +0700 Subject: [PATCH] PDF import: a held glyph stroke takes its turn in the page's overprint list --- crates/pdf/src/import.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/pdf/src/import.rs b/crates/pdf/src/import.rs index 70877028..1c4ca1b3 100644 --- a/crates/pdf/src/import.rs +++ b/crates/pdf/src/import.rs @@ -1277,7 +1277,9 @@ impl<'p> Builder<'p> { if ![(b.x0, ink.x0), (b.y0, ink.y0), (b.x1, ink.x1), (b.y1, ink.y1)].iter().all(|(a, c)| (a - c).abs() <= tol) { return false; } - let st = stroke_layer(p, opacity, props, mean_scale(transform)); + let mut st = stroke_layer(p, opacity, props, mean_scale(transform)); + // Every painted path takes its turn in the scan's overprint list, a held one too. + st.overprint = self.path_overprint(); let n = Node::path(self.id(), PathData::from_bezpath(&bp), Appearance { items: vec![AppearanceItem::Stroke(st)], ..Default::default() }); if let Some(line) = &mut self.text { line.held.push(n);