mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Text drawn in rendering mode 3 (3 Tr), which is how a scanned page carries its recognized OCR text, was left out on open (since #2988, with a warning), so a scanned PDF opened and saved again lost its searchable text. Import: an invisible glyph now comes in as type with neither fill nor stroke. It skips the glyph-outline checks that guard how visible type looks, and it joins only other invisible text on a line (Look::takes no longer lets it into a stroke-only run). INVISIBLE_TEXT_NOTE now only reports text that can't be type (text opened as outlines, Type 3 fonts), and tests_reader_compat::invisible_text_is_reported_when_left_out expects the invisible line as unpainted type when text opens as type. Export and print: characters with no fill and no stroke are written as real text inside a form marked Mark::Invisible; forms::finish sets that form's text rendering mode to 3, so it draws nothing but stays selectable and searchable (PDF/X-1a and PDF/A-2b too). The writer has no invisible mode of its own, so this reuses the marked-form mechanism used for layers and overprint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>