mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 21:11:52 +00:00
unlink_type3 (#4579) unlinks the Type 3 glyph programs that nothing shows any more. It found what is still shown by scanning page content and the forms reached through /XObject only. Annotation appearances, tiling pattern cells and soft mask groups draw too. A glyph only they showed counted as unused, so its program left /CharProcs, or the whole font lost /CharProcs and left the page's /Font. This ran on every Apply Redactions, even when the mark covered text in another font. The scan now also walks the appearance streams of each page's annotations, the tiling pattern an scn or SCN selects and the group of the soft mask a gs sets. Each is scanned once per stream, font and holder, through its own /Resources or its caller's, with no current font. Forms take the same path through scan_stream_object. Three tests, one per drawer. All three fail without the fix.