mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
A PDF can define spot inks that have different names and the same alternate space and tint transform, such as Blue1 and Blue2, both RGB 0 0 255. The interpreter drops the ink name, so the importer matches an interpreted color to the file's Separation and DeviceN spaces by the tint transform. The spaces of two such inks matched the same color, so their paths imported as plain RGB and neither ink became a spot swatch. This happened with both inks on one page, with each on its own page, and in the PDF part of a .ai file. The page walk in import_scan.rs, which follows the interpreter's order for layers and overprint, now also records the ink of each path, from the color space set by cs and CS or from the shading of the pattern set by scn and SCN or drawn by sh, and the ink of the color space of the text between two paths. When the spaces of several inks match a color, the importer takes the space with the walk's ink names. It applies these names to a page only when the page uses such an ink and a counting pass of the interpreter draws as many paths there as the walk counted. Otherwise the import works as before. The file now opens with a spot swatch for each ink. Solid fills and strokes of paths and type, and the stops of gradients on paths, link to the swatch of their ink, the points of a gradient mesh keep the ink's color, and PDF export writes each ink as its own separation. Paint in these inks inside pattern cells, soft masks and type 3 glyphs, and gradients on type in these inks, still import as RGB. Type in one of these inks can also import as RGB when type in another Separation or DeviceN ink is shown with no path drawn between them.