mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-27 19:27:21 -06:00
PDF import and export: keep invisible text (rendering mode 3) as type (#2675)
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>
This commit is contained in:
committed by
bflatastic
co-authored by
Claude Opus 5.5
parent
498d17f72e
commit
ac7f0eebf8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user