mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-26 02:37:01 -06:00
Text effects from stock sites are Illustrator EPS with live type whose appearance (several fills and strokes, offset paths, drop shadows, glows) is flattened into many small images and clipped type. Made here with Illustrator 2026 (graphic styles and live effects on type, live and outlined, formats 2026, CS6, 10 and 8), every one fell back to its preview: - Illustrator's procsets keep their own graphics-state stack in a dictionary, count each `save` in it and raise `limitcheck` at 64, relying on `restore` to put the count back. `restore` didn't undo dictionary changes, so a file with more than 64 images (each drawn in a save) stopped. Now `restore` puts dictionaries back as they were at the `save`, as restoring virtual memory does: while a save is open, `def`, `store`, `put`, `undef` and dictionary `copy` keep the old value in a journal (counted against the memory budget), undone newest first. A save that was restored already (or through an outer one) can't be restored again (`invalidrestore`). - The Illustrator 8 format's pattern fills divide by the font cache's largest glyph (`cachestatus`), which was 0: it now reports a printer's sizes. - Type in Illustrator's reencoded font copies (`/Impact*1`) was set in the fallback font: the `*1` suffix is dropped when the family is looked up. The images of those effects also came in banded on main; that is #498's fix, which this builds on. Tests: 100 saves counted in a dictionary and restored, every dictionary change undone, saves restored twice, `cachestatus`, reencoded font names. The import fuzz vocabulary has saves and restores around dictionary changes. The generated files (not committed) now open with no warnings and look like their previews; the Illustrator 8-format ones draw what their PostScript holds (that format writes effects as opaque rasters). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>