A gradient stop linked to a spot ink that also carries process plates
(a DeviceN stop opened from a PDF) printed only its spot tint: print
separations and Separations Preview left its Cyan, Magenta, Yellow and
Black plates blank. They now print the stop's plates beside the tint.
With spots printed as process, each process plate prints the stop's
plate layered with the spot tint's process equivalent, as a separated
image's spot plates layer. Plates beside no spot link, or beside
Registration, still print nothing of their own.
The color visitor also skipped a freeform gradient's points, so print
plates kept their display colors and Document Color Mode left them
unconverted. The points are now visited as unlinked colors.
A blend between two gradients whose matching stops are tints of one spot
swatch kept the link and interpolated the tint, but every step's stop lost
the process inks (C, M, Y, K) printed with the spot ink, so PDF export wrote
the steps as the spot ink alone.
- Matching stops linked to one swatch interpolate each process ink with the
tint; a stop without process inks counts as none of each, and the ends
keep their own.
- Gradients with different stop counts keep the inks at every resampled
stop, interpolated with the midpoint-adjusted fraction between two stops
of one swatch.
- A solid blended with a gradient brings no process inks of its own: its
stand-in gradient no longer copies the other gradient's.
Stops of different swatches, or linked and unlinked stops, still blend into
unlinked process colors without plates.
A gradient's Separation or DeviceN space, and EPS's %%DocumentCustomColors,
named the spot ink of every linked stop. A stop out of order whose
neighboring stretches have no width, a stop at a tint of 0 without process
plates, and in PDF a stop whose stretches are fully transparent print no
ink, but their spot inks were still declared, so separations got an empty
plate.
- vectorcraft-color: Gradient::drawn_stops (the rule Document Info uses,
moved here) and Gradient::reached_stops (every stop taken as opaque).
- PDF: Separation and DeviceN shadings, the Perceptual spot shadings and
the spot-image warning name only inks of drawn stops at a tint above 0
or with process plates; other stops are written with no ink, so their
process inks and RGB or Lab colors no longer shape the space either.
- EPS: the same with reached stops, since EPS writes stops opaque; a
transparent spot stop keeps its ink.
Output is unchanged when every stop colors part of the gradient and every
spot stop has a tint above 0 or process plates.
A CMYK TIFF written again, a CMYK JPEG that the Compression settings
resample or compress again, and a CMYK image written with its mask as
its soft mask lost the CMYK profile the image embeds. Such an image is
now written in an ICCBased space holding that profile, byte for byte,
when output.profiles is all or taggedSource, and in PDF/A-2b, PDF/X-3
and PDF/X-4 unless profiles is destination. Pixels the Output settings
convert are never tagged with it.
A CMYK JPEG embedded as it is now follows the same rule instead of
always carrying its own ICC_PROFILE segments: with profiles none it is
DeviceCMYK, and PDF/X-1a export no longer refuses a CMYK JPEG that
carries a profile.
A profile tags an image only when it is at most 16 MiB and its declared
size, acsp signature, device class, CMYK color space and tag table are
well formed. Tagged CMYK documents blend transparency in the document's
CMYK profile space, not in an image's own; without that space they
blend in DeviceCMYK, or keep their RGB space in PDF/A.
PDF export writes a translucent knockout group as a form with its opacity around the /K group. PDF import now reads that pair back as one knockout group with the opacity, blend mode and isolation, instead of a translucent group holding a knockout group.
* PDF import: outlined Indic glyphs keep their own stroke and transparency (#5235)
Follow-up to #6906, for two review findings on how a line kept as
outlines is joined into paths:
- Glyphs were joined when their stroke widths matched; dash, cap, join
and miter limit were ignored, so a dashed glyph took the stroke of the
solid one before it. They join only when the whole stroke matches.
- Translucent glyphs were joined into one fill, where overlapping marks
paint once instead of compositing as the file draws them. Only opaque
glyphs join.
Also records the fix in the PDF row of docs/target-app-parity.md and in
docs/roadmap.md, as AGENTS.md asks.
Tests: outlined_glyphs_stroked_differently_stay_apart and
outlined_translucent_glyphs_stay_apart (both fail without the change).
* PDF import: outlined Indic glyphs under a soft mask stay apart; check kept geometry (#5235)
Review follow-ups on #6957 and #6906:
- Glyphs kept as outlines under a soft mask were joined into one path,
so the mask was applied once to all of them where the file applies it
to each glyph. They now join only when no soft mask is active.
- The fallback tests counted outline nodes only. A new test compares the
kept outlines (element count and bounding box) with the same file
opened as outlines, so a dropped or moved glyph fails it.
Tests: outlined_glyphs_under_a_soft_mask_stay_apart (fails without the
change) and kept_glyphs_are_where_the_file_draws_them.
* PDF import: mask outlined Indic glyphs one by one under a soft mask (#5235)
Review follow-up on #6957. Keeping glyphs out of one shared path was not
enough: each path still went into the soft mask's queue and
flush_masked wrapped them all in one masked group, so a mask that is not
constant was applied once to every glyph, where overlapping glyphs
composite one by one in the file.
With a soft mask active the queued art is now drained before the first
glyph and after each one, so every glyph gets a mask of its own.
Test: outlined_glyphs_under_a_varying_soft_mask_are_masked_one_by_one
checks that each outlined glyph carries its own mask (0 of 3 without
the change).
* #6957: clarify soft-mask exception in glyph grouping docs
---------
Co-authored-by: ruchirguitar <info@jeevantirth.org>
A symbol instance colored with the Symbol Stainer lost its stain in
export whenever the canvas's stained art was not used:
- An instance with geometry effects was reshaped for export from the
symbol's art with only its dynamic changes, so SVG, PDF, EPS, .ai,
DXF, EMF/WMF and HPGL wrote the unstained colors. A color adjustment
on an instance recolored the unstained art the same way.
- PDF, EPS, legacy .ai, DXF and EMF/WMF wrote an instance without
effects from the unstained art.
tint_node, stain and instance_art now live in
vectorcraft_doc::symbol_overrides, which both the effects and the
exporters can use; vectorcraft_brush re-exports them. Baking, color
adjustments and the writers above now use instance_art: dynamic changes
first, then the stain.
The search for brushed strokes that decides between knockout masks and
a PDF knockout group copied a dynamic symbol's art for every instance
with appearance changes, and looked through the evaluated art of live
objects, without a limit. Nested instances could make it copy and walk
art exponentially before any limit applied.
The search now visits and copies at most MAX_KNOCKOUT_MASK_OBJECTS
objects for a group, counting a dynamic symbol's art before copying it
and a live object's evaluated art before looking through it. When the
limit runs out, the group is written as a PDF knockout group with the
size warning. Each symbol's art with one set of appearance changes is
copied once, and art that holds itself ends the search.
The copies of symbol instances drawn in a knockout group's soft masks
counted toward the objects the export's visible symbol art may hold, so
overlapping instances could use that limit up and leave later visible
instances out. Mask copies now count toward a limit of their own. When a
group's masks would leave out symbol art because that limit runs out,
the masks are discarded and the group is written as a PDF knockout
group, with a warning.
The object count that decides whether a group is drawn through masks
left out the art a brushed stroke expands into. A group in which a mask
would draw a brushed stroke is now written as a PDF knockout group, with
its own warning. The search follows what the export draws: visible
members, opacity masks that are on, symbol and inline graphic art, live
objects and placed documents as evaluated, and pattern tiles, and it
skips strokes without paint, width or a known brush.
A knockout group whose elements need no masks is written as a PDF
knockout group without a warning, so the two engine PDF tests that
expected the old warning now check that case and the brushed one.
With downsampling on, each piece of an image bent by a Warp effect was
resampled for its own placed size, so a warp wrote one image XObject for
each size a piece was placed at (four for a 4 x 4 warp that stretches
across, eight for a colorized one with its soft masks). The pieces are
now resampled for the widest and the highest size any piece places the
image at, and all paint that one image. Pieces off the page count too,
and another placement of the same image keeps its own size.
Without downsampling, a colorized image and a CMYK image with a grid
mask no longer key their cache by placed size, so each is decoded and
encoded once for all the sizes it is placed at, as plain images are.
A knockout group was written as a chain of soft masks, one inside the
next for each element, so a group of about 200 elements made a PDF that
VectorCraft's own PDF import refused (form nesting past 50) and an SVG
that the web build refused as too deep.
- PDF writes a knockout group as one transparency group with /K true,
with /I true when the group isolates, and PDF import reads it back as
a knockout group. An element with several paints is drawn as one
group inside it, so its own fills and strokes do not knock each other
out.
- Where an element knocks out less than the area it paints (its opacity
or mask defines its knockout shape, or it paints translucently), each
element is drawn through one soft mask of the overlapping elements
above it. Past 65,536 objects in a group's masks, or 2,048 elements,
the group is a PDF knockout group, with a warning.
- SVG draws each element through one mask of the overlapping elements
above it, built from one shared copy of each element's shape, so the
elements stay siblings. Past 65,536 shapes in a group's masks, or
2,048 elements, the group is written as a plain group, with a warning.
Docs: docs/mcp.md, docs/target-app-parity.md.
In SVG and PDF output, each piece of a warped image whose pieces can show
through was drawn through a mask of every later piece that reaches it. On a
later piece's antialiased edge the viewer multiplies the earlier piece's
coverage by the mask and draws the later piece over it, so an image with
both opaque and partly transparent pixels came out lighter at its opaque
pixels along the triangles' edges (alpha 184 of 255 in the new SVG test).
A later piece now goes into an earlier piece's mask only when a pixel of
either piece's image within 2 pixels of their overlap is less than opaque
(vectorcraft_effects::WarpSeams). Where two pieces overlap over opaque
pixels, the later one is drawn over the earlier one without a mask.
An envelope or the Warp effect cuts an image into triangle pieces that
reach a little past their edges, so neighbors overlap and no seams show.
On an image with alpha, the overlap drew that alpha twice: a 50% image
came out about 75% opaque along every cell edge and diagonal.
- The pieces now form a knockout group, and each piece is marked as a
warp piece (`warp_piece`) whose knockout shape is its whole triangle,
so where pieces overlap only the top one draws.
- The canvas knocks each piece out by its triangle at full coverage.
- SVG and PDF draw the pieces of a partly transparent image (its pixels,
opacity, color mask or colorize paint) through one mask each, of the
later triangles that reach it; pixels on a triangle's antialiased edge
come out slightly lighter there. Pieces of an opaque image are drawn
one over another as before.
- SVG writes one copy of the image for pieces cut by opacity masks
(Preserve Shape Using Transparency) too.
- A cell count past the generated-object budget makes an empty group
instead of overflowing.
Docs: docs/target-app-parity.md.
The Gradient panel's Method menu gets two methods of VectorCraft's own
beside Classic and Perceptual. They mix a linear, radial, conic or
diamond gradient's colors around the hue wheel: hue, saturation and
brightness each change evenly from one stop to the next, and the hue
angle keeps one direction, as the fixed-direction rules of
https://www.w3.org/TR/css-color-4/#hue-interpolation do. Hue Clockwise
lowers the angle (red, magenta, blue), which is clockwise on the color
wheels, and Hue Counterclockwise raises it (red, yellow, green).
Two stops whose hues are less than half a color level apart count as
one hue and keep it, so a color and a tint or shade of it do not turn
the whole wheel. A stop whose RGB numbers are less than half a color
level apart is gray and takes the hue of the stop it mixes with, and
black takes that stop's saturation too.
- `paint.editGradient` and `paint.setFill` take `method: hue-clockwise`
or `hue-counterclockwise`, in any case, with a space or an underscore
for the hyphen or without it; other spellings are an error. The native
file writes `HueClockwise` and `HueCounterclockwise`.
- The canvas and raster exports draw the gradient through stops on its
curve, within half a color level.
- Reverse turns the method the other way with the stops, and a Reflect
spread is repeated from the curve's stops, so both keep the colors.
- SVG and PDF write the gradient as an RGB image, CMYK and spot color
stops included, with the spot warning. EPS writes a shading in process
colors with a warning for spot stops. A legacy .ai file and the .ai
editing data get the colors between the stops as stops of their own,
in process colors, at most 256, with a warning. CSS gets those stops
too.
- The `method` error names the four values, in every catalog.
- The Method menu is as wide as its longest name in the interface
language, within the panel.
Docs: docs/mcp.md, docs/plugins.md, docs/target-app-parity.md, ROADMAP.
PDF export without a PDF/X or PDF/A standard writes pages longer than
200 in at full size in points instead of with a UserUnit scale.
longPagesInPoints is now on by default in PdfSettings, the built-in
presets and the Save PDF dialog. Turning it off writes such a page with a
UserUnit from PDF 1.6 on, as before. PDF/A-2b files keep the UserUnit,
and .ai saves keep it unless longPagesInPoints: true is passed.
Docs: params text, docs/mcp.md, docs/target-app-parity.md.
The Character panel menu has Warichu and Warichu Settings… with Show East
Asian Options. Warichu characters are set at a percentage of their size
and stacked on 1 to 6 lines inside their line: one above the other in
horizontal type and side by side in vertical type. Warichu Settings sets
Lines, Line Gap, Scale and Alignment.
- text.setFormat and text.setRangeStyle take warichu, warichuLines,
warichuGap, warichuScale and warichuAlign; ui.warichuSettings opens
the dialog.
- A stretch of warichu characters is one block that stays whole on one
line. The canvas and every export draw the stacked lines; SVG, PDF and
the .ai writers write such type as outlines, as they do ruby. Type on a
path sets the characters at their own size.
- The attributes are saved natively, carried by character styles and
translated in every complete catalog.
Docs: docs/mcp.md, docs/type-parity.md.
A print to a file and the print preview list their notes as saves and
exports do since #6920: what the job leaves out of the document or prints
differently first (art outside the imageable area, type in a fallback
font, transparency flattened for PostScript), then the notes on the
options (halftone screens and a fixed flatness that aren't written, copies
per sheet that don't fit, a printer profile left out, ink options that
name no ink). Each kind keeps the order it is given in.
The print layout, the PDF print and the PDF print plan return the notes
on the options in `setting_notes` beside `warnings`, as `ExportReport`
does. The status message after a print to a file names the first note,
so a fixed flatness no longer hides type printed in a fallback font.
- The link watch and links.updateChanged look at a DCS file's plate files
of their own, so a changed plate file is read again.
- links.update and links.relink apply the file's clipping path to the
images in symbols, graph designs, patterns and masks too. When the new
file has no clipping path, a clip group holding the old file's clipping
path loses that path and stays as a plain group of the image, keeping
its id, name, visibility and transparency. The image keeps that path with its plates to tell it from a
clipping mask made in the document; a clipping path given another fill
rule in the document stays. An even-odd clipping path in the file is
kept as the same area under the nonzero rule.
- links.update and links.relink return the swatch warnings file.place
gives, including two files that add one ink in two colors.
- links.relink with copy fails for a DCS file with plate files of its own.
- file.place answers the image id of a clipped DCS placement as image,
and checks page and crop for a DCS file as it does for an EPS file.
- Print separations and Separations Preview take a spot plate's color
from the document's swatch of its ink, and a reduced image's plates
keep their coverage.
- Show DCS Transparency Interactions counts a transparent DCS image and
characters filled or stroked with a transparent gradient.
- %%PlateFile names keep their spaces, and header bytes that are not
UTF-8 are read as Latin-1.
- A plate program that draws more than one image, art besides its image,
or its image through a clipping path is an error naming the plate
instead of printing the wrong ink.
- Nested clipping paths around the composite clip the image together.
- A kept image with more plates than are read, or more TIFF directories
than its composite and plates, is the CMYK image of its composite
only, not a set of plates cut short.
- swatch.unused counts a spot or process swatch as used only while an
image the art shows has a spot plate of its name.
File › Place with Link reads a DCS 1.0 or 2.0 file (an EPS file whose
header names one EPS program per printing plate) as one linked image of
its plates. Each spot plate adds a spot swatch in the CMYK values the
file gives, and the clipping path the file's composite is drawn through
clips the image. document.open, file.place without link or from bytes,
and links.embed refuse a DCS file and change nothing.
- The screen, composite print and exports show the plates mixed into
CMYK. Separations Preview and print separations show each plate on
its own ink; a spot plate prints as its CMYK values when spots print
as process.
- links.list answers the format DCS, and with dcsTransparency marks the
DCS images that are transparent or overlap transparent objects (the
Links panel menu's Show DCS Transparency Interactions).
- swatch.unused leaves out a spot swatch while a DCS image has a plate
of its ink.
- links.update and links.relink read the plates and the clipping path
again, and the link shows as modified when one of its plate files
changes or is gone.
- The plates go on the first plate's pixel grid, grown to hold every
plate where it prints; a plate of another size or position is
resampled onto it.
- A file may name 64 plates, a plate file may be 1 GB, and the plates
together may hold 512 MB of ink amounts. A file naming more plates is
an error.
Docs: docs/mcp.md, docs/target-app-parity.md, docs/file-format-parity.md.