Handle unclaimed XeTeX specials at shipout

This commit is contained in:
gloamxun committed 2026-11-28 06:04:09 +08:00
1 parent e2af618e65
commit 885911485e
10 files changed
+273 -21

No files matched your search

@@ -627,7 +627,11 @@ impl Executor {
_ => {}
}
shipout.specials.push(special);
shipout.pdf_graphics_steps.push(graphics);
// The XDV driver enters graphics mode for every special, even
// an empty special or one consumed without painting.
shipout.pdf_graphics_steps.push(graphics.or_else(|| {
xdv.then_some(PdfGraphics::TextBoundary)
}));
} else if output.is_pdf_graphics() {
if device.pdf.is_none() {
return self.fail("cannot ship a PDF graphics operation to DVI");