mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-08 02:30:09 +00:00
The Adobe Illustrator File Format Specification 7.0, section 4 (p. 51), says the name shown for a global object is the part of its name in the file before the newline (https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). The legacy reader kept the whole name, so swatches and patterns came in named "Sky\n1". The reader now applies this rule to the files of every version it reads. - Gradient swatches, gradient fills, pattern definitions, pattern fills, palette cells and art-style pattern fills use the part before the newline. Lookups inside the reader still use the whole name. - When that name is taken, the first free "Sky 2", "Sky 3" is used. Taken names are None and Registration, the palette's own swatch and group names, the default swatches when no palette replaces them, named colors (color operators, gradient stops, version 7 pattern strings, the header's and an EPS program's custom colors), the names of gradients and patterns that have no newline, and the names given to earlier gradients and patterns. Only content the reader reads counts: not the alternates of versioned content, the prolog, skipped sections or what follows the trailer. - A name with nothing before the newline comes in as "Gradient" or "Pattern". Names without a newline do not change. - docs/file-format-parity.md lists the rule.