A file whose catalog has a CMYK /GTS_PDFX output intent describes its
DeviceCMYK colors with that intent's profile. A DeviceCMYK image in
such a file now opens tagged with that profile, so a CMYK image that a
PDF/X export writes as DeviceCMYK opens with its profile again.
An image drawn where a /DefaultCMYK is in scope keeps no profile, since
the default replaces DeviceCMYK there. The scope is read per image from
the resources it is drawn with, and the image cache keeps the tagged and
untagged reads apart.
The scan that looks for d0 glyph procedures ran every time a page or a
form listed a Type 3 font in a font dictionary of its own, and its result
was dropped once the font had been noted. It now runs when the font is
first noted for the document. Each page still maps the font's glyphs,
and the note the import keeps for the font is unchanged.
On PostScript separations, up to half a percent of another ink in a color
that counts as 100% black is left off that ink's plate, so an overprinting
near black does not knock out the ink below it. A color linked to a swatch
the document does not have was left out of that rule, although it separates
from its own values like an unlinked color and Overprint Black marks it to
overprint. A 100% K with 0.4% cyan linked to such a name then stayed on the
cyan plate and knocked out the cyan under it.
A link to a missing swatch now counts as unlinked for this rule, on solid
fills, strokes, character fills and gradient stops. Spot swatches and
Registration are still excluded, and PDF plates still draw the faint ink.
A PDF/X-3 or PDF/X-4 export tagged every CMYK color with an ICC-based
space of the same profile that the output intent embeds. In PDF/X-3 and PDF/X-4, CMYK colors in the
profile of a CMYK output intent are now DeviceCMYK, and the profile is
written once, as the output intent's DestOutputProfile (ISO 32000-1,
14.11.5:
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#page=641).
- With output.profiles none and a CMYK output intent, PDF/X-3 and PDF/X-4
write every CMYK color as DeviceCMYK, unless colors are converted to a
CMYK destination of another profile, which keeps its tag. Before, those
standards tagged every color whatever profiles said.
- RGB and gray colors stay tagged, and so do CMYK colors and images in
another profile.
- A CMYK image that carries the output intent's profile is DeviceCMYK,
and so is every CMYK image when none makes CMYK colors DeviceCMYK. A
CMYK JPEG then loses its ICC_PROFILE segments.
- Transparency groups blend in DeviceCMYK when CMYK colors are
DeviceCMYK, also when the file has no ICC-based CMYK space.
- Files without a standard keep the tags that profiles asks for.
- The Save PDF dialog's note for PDF/X-3 and PDF/X-4 says that CMYK
colors in the output intent's profile are written as DeviceCMYK.
Docs: docs/mcp.md, docs/target-app-parity.md and the document.exportPdf
params text.
Look::takes let a glyph filled only join a run whose glyphs were also
stroked, so after mode 2 text a mode 0 glyph took the run's stroke:
`2 Tr (B) Tj 0 Tr (C) Tj` came in as "BC" stroked throughout. A glyph
now joins only a run drawn alike (fill, stroke, overprints), so a glyph
filled only starts a run of its own and takes a stroke only when the
matched-stroke path (#8039) strokes it.
flush_stroke no longer strokes a whole run in place: a whole run goes
through the split and join code, so fill and stroke rendering glyph by
glyph still builds one stroked run.
A PDF/X-4 export wrote xmp:ModifyDate and xmp:CreateDate in its XMP
metadata but no xmp:MetadataDate. The PDF/X-4 metadata edit now adds
xmp:MetadataDate next to xmp:ModifyDate, with the same value, and grows
the stream's /Length to match. When the export dates the file as modified
later, post::modification_date already rewrites every xmp:MetadataDate,
so the two dates stay equal.
PDF/X-1a, PDF/X-3, PDF/A and plain PDF exports are unchanged.
A fill and a stroke at the same opacity below 1 were joined into one
type object whose opacity then applies to both together, losing the
darker overlap the file composites. stroke_filled now takes a stroke
only when the fill and the stroke are opaque.
An upright glyph filled and stroked was kept as an outline for the
reshaped-outline fallback while upright glyphs filled only were not;
it is no longer kept either, so such a line can't come in as the
outlines of its stroked glyphs alone.
Docs: the #8015 entries say what is left (translucent type, and a TJ
that starts a new line part way through).
- New tests: small opaque RGB and gray images are stored as RGB PNGs and an
image with a soft mask as RGBA; an image with one row more than the
pixel limit's square is left out with a warning.
- Gray images stay RGB on import, and a comment says why: a gray PNG
would make the image one that a fill color colorizes.
- Doc comments and the docs line give the limits in GiB, the line moves
next to the line about refused PDF parts, and it no longer gives a
timing.
A PDF, or a `.ai` read through its PDF part, was refused when one image
would decode to more than 1 GB, and the shared reader skipped images of
more than 2^28 pixels. On a 64-bit desktop build both limits are now 4 GB
and 2^30 pixels (`image_limits`), which `MAX_IMAGE_DECODED` and
`open_options()` share; 32-bit and web builds keep 1 GB and 2^28 pixels.
An image past the limit is refused with the same message.
An opaque image is encoded as an RGB PNG from its decoded samples instead
of building an alpha channel and an RGBA copy first.
Docs: docs/target-app-parity.md.
Part of #4366.
A PostScript plate drew an overprinting fill, stroke or character as
nothing when it put up to half a percent of that plate's ink down, so a
faint ink was lost from the plate. Now only a paint with no ink on the
plate is drawn as nothing, on PostScript and PDF plates alike. The one
exception is a color that counts as 100% black and is not linked to a
spot swatch or Registration: on a PostScript plate, up to half a percent
of another ink in it still counts as none, so a near black set to
overprint keeps the ink below it.
Each spot ink in the Output section's Document Ink Options list now has
an icon before its name. Clicking it prints that ink as process: its art
separates onto the process plates and it gets no plate of its own, while
the other spot inks keep theirs. Clicking again keeps it as a spot ink.
While Convert All Spot Colors to Process is on, every spot ink converts
and the icons are dimmed; each ink keeps its own choice for when the
option is turned off. A converted ink's Print box, frequency and angle
are dimmed.
file.print and print.preview take convertToProcess on an output.inks
entry, and print.preview lists every document ink, converted ones
included, in documentInks.
- A PDF plate no longer drops an overprinting paint whose ink on that
plate is under half a percent: it draws with Darken. PostScript plates,
which have no blending modes, still draw such a paint as nothing.
- With Overprint Black on, the art of a symbol that type shows as an
inline graphic has its repainting instances placed too, so their own
fill and stroke changes decide whether they overprint.
- A gradient's freeform points count only when its kind is Freeform, in
the Overprint Black check and in the plate separator. A gradient of
another kind is checked by its stops.
- Characters inside opacity mask art no longer draw with Darken on
separations, as the mask art's fills and strokes already do not.
- With Overprint Black on, a symbol instance whose own fill or stroke
changes or fill stain repaint its art, or whose symbol holds such an
instance, prints as its placed art and is checked with the paints it
prints with. Placement stays within the symbol object limit and the
drawn depth limit, and skips hidden objects and template layers.
The Print dialog's General section (and the print preset editor) gets a
link button after Scale W and H. While it is on, typing either percentage
sets the other, and turning it on sets H to W. It is on for new settings,
dimmed with the fields unless Scaling is Custom or a tiling choice,
toggled with a click, Space or Enter, and screen readers hear its name
and on or off state. W and H now take 1 to 1000 %.
The link is saved as scale.linked with the other print settings, in the
document and in print presets. A scale saved without it reads as unlinked,
so earlier settings print as they did. print.setup, print.preview,
file.print and print.presets.save apply the same rules: one percentage
sets the other while linked, a different width and height without a
linked key turn the link off, and with linked: true (or linked: null over
a linked scale) they are an error.
The export walks for type and fonts and the artboard crop shared one
SymbolBoxes for every object. A SymbolBoxes also holds measuring budgets
(effect reaches, 9-slice placements), so in a large document objects late
in a walk could be measured by estimates where main measured them exactly.
SymbolBoxes::unmeasured makes new boxes that share the name index, and each
object is measured in boxes of its own again.
- The live-object walk (render/src/live.rs) finds symbols through the
frame's SymbolBoxes.
- SVG export's filter regions measure each object in unmeasured boxes, and
the region boxes share the writer's index.
- SVG import keeps each imported symbol's index, so a symbol whose art
holds instances no longer scans or indexes the list again.
- Object › Rasterize's clipping mask is left as it is on main, with
drawn_outline_with removed.
- The symbol-read-count feature of vectorcraft-doc gives other crates'
tests vectorcraft_doc::symbols_read. New tests check that a frame, an SVG
export, a PDF export, the type walk and the artboard crop read the symbol
list once among 2,000 symbols and 300 instances with drop shadows.
When the import refuses a file's PDF part and its editing data can't be
read either, the error named only the PDF part. It now adds "its editing
data couldn't be read either (<why>)", as layers already do
(crates/eps/src/import.rs). The reasons come from the editing data
reader (a size limit, damaged compression) and from the private data
streams (larger than 256 MB, another filter or decode parameters,
damaged zlib data). A file without editing data, and an open with pages
picked, layers off or the editing data off, keep the PDF part's error.
Part of #4366.
The Print dialog's Output section has an Overprint Black checkbox under
Convert All Spot Colors to Process, off by default and available with
Separations (print.setup output.overprintBlack, kept with the document
and in print presets). With it on, solid 100% process K or 100% gray
fills, strokes and characters, and gradients whose every stop (or every
freeform point) is, overprint in the printed copy, so the inks under them
stay on the other plates. Rich, RGB, Lab, spot-linked and lighter blacks
knock out. The document and its own overprint settings do not change, and
composite output ignores the option.
Plates draw an overprinting paint that puts no ink on them as nothing, so
PostScript separations keep the inks below it too. Overprinting character
fills and strokes now darken on PDF plates like fills and strokes, a type
object's own fill in a PDF is drawn with its blending mode, and Edit >
Edit Colors > Overprint Black counts a gradient with a spot-linked stop as
a spot black and a freeform gradient by its color points.
Drawing or exporting a symbol instance looked its symbol up by scanning
the document's symbol list, so a document with many instances and many
symbols spent most of a frame or an export on name comparisons. The
renderer, the SVG and PDF writers and the export walks now find symbols
through SymbolBoxes::symbol, which builds the name index once per frame,
export or walk and returns the first symbol of a name as before.
- Renderer: plain instances, inline graphics, instances with object
effects (their art and the symbol budget) and the effect bounds.
- SVG export: instance art, symbol defs and their reuse check, and the
paint reach of filter regions.
- PDF export: instance art, inline graphics and the brush search of
knockout masks.
- Export warnings and artboard crops measured what each object paints
with new symbol boxes per object, which built the name index again for
every instance. painted_bounds_with and drawn_outline_with take the
boxes once; Object › Rasterize's clipping mask uses them too.
Match a stroke to a filled glyph by its whole placement (origin, size,
horizontal scale, slant and direction), not just its origin, so a stroke
drawn at another size over a filled word stays type of its own. Restyle
only the matched glyphs' text instead of the rest of their run: strokes
over neighbouring glyphs gather and restyle once, so a word filled and
stroked whole stays one run, while a stroke over one glyph of a filled
word strokes that glyph alone.
With text rendering modes 2 and 6 the reader fills every glyph of a
text-showing operator before stroking them, but the importer only joined
a stroke to the glyph filled last, so a word shown in one Tj came in as
a stroke-only Type over a fill-only one. TextLine now records the glyphs
it fills and stroke_filled matches each stroke to its filled glyph in
order, splitting a run where the stroke differs.