File Info's menu saves the fields as an XMP metadata template (into the
Metadata Templates folder next to the preferences, or any file), imports
one with a choice of three merges, lists the saved templates and opens
the folder. The import is one undo step and records nothing when no
field changes.
- file.info.saveTemplate writes the title (when it is not the
document's name), author, author title, description, keywords,
rating, copyright status, notice and URL that have a value.
- file.info.applyTemplate reads a file, a saved template or XMP text
(at most 8 MB) and merges it: replace clears the fields first, keep
takes each field the template has, append adds keywords and fills
only empty fields. apply: false returns the merged fields without
changing the document.
- file.info.templates lists the folder's .xmp files.
- A PDF or .ai also opens with the rating and author title its XMP
packet gives.
Docs: docs/mcp.md, docs/target-app-parity.md.
EMF, WMF and SVG wrote a symbol instance from its symbol's art as stored,
so live effects inside that art were missing: a square moved 100 pt by a
Transform effect stayed in place in the file while the canvas drew it
moved. Art whose own place is off the artboard was left out even when
the effect moved it onto it.
These exports now call bake_document_placing_symbols, as PDF, print, EPS
and DXF do: each instance of a symbol whose art needs baking is written
as that art placed by the instance and then baked, so an instance that
scales or turns its art does not scale what its effects do. EMF and SVG
clip 9-slice cells and WMF does not, as each places other instances. In
SVG those instances are written as groups; instances of symbols without
such effects still share one <symbol>. Preserve Editing still embeds the
document with its live effects.
WrittenLayers gains hidden_objects. SVG sets it with Hidden Layers on,
since it then writes hidden objects too, so a hidden instance is written
hidden with its effects applied. The other exporters leave it off.
An SVG instance nested in another instance's art was shared through
<use> when the def allowed its own transform, while the <use> writes
that transform after the outer instances'. A stroked symbol nested in a
scaled instance then drew its stroke at double weight. The check now
uses the transform the <use> writes.
Opening a PDF with Crop To Trim Box put each artboard 36 pt after the
one before, while the bleed boxes round the trim boxes became the
document's bleed. With a bleed over 18 pt, one page's bleed reached
into the next artboard, and a page exported with its bleed showed part
of its neighbor. The document's bleed is now read from every picked
page first, and the artboards are 36 pt apart plus that bleed on both
sides, as linked pages on their trim boxes are laid out since #7723.
With Preserve Numbers, a non-sRGB RGB destination and RGB colors
ICC-tagged as sRGB (the `all` profiles setting, PDF/A-2b, PDF/X-3 and
PDF/X-4), a gray image that carries an ICC profile was converted to sRGB
grays and lost its profile. It now keeps its profile there, as in the
other destinations other than sRGB.
With Output › Convert to Destination (Preserve Numbers), and in PDF/X-1a,
which converts the same way, a gray or RGB image that carries an ICC
profile had its numbers read as sRGB: converted as sRGB to a CMYK
destination, and kept as they were in an RGB one. Preserve Numbers keeps
the numbers of untagged content only, so such an image is now converted
from its profile to sRGB with the color settings' intent, and then to a
CMYK or other RGB destination, the document's own RGB profile included.
- An untagged RGB image keeps its numbers in an RGB destination and
converts from sRGB to a CMYK one, as before.
- A gray image is converted to sRGB grays in an sRGB destination and
keeps its profile in the others.
- With RGB colors ICC-tagged as sRGB, the image is written as sRGB.
- A profile the color engine can't read leaves the image as it is in an
RGB destination, and its numbers read as sRGB in a CMYK one, with a
warning each.
- The table for an RGB destination is built only when the first tagged
image needs it.
When Profile inclusion is set to Don't Include Profiles (`profiles:
"none"`), gray, RGB and CMYK images are written in device color spaces
without their ICC profiles, and a JPEG that is kept as is loses its
APP2 ICC_PROFILE segments. PDF/A-2b, PDF/X-3 and PDF/X-4 keep tagging
their images.
Leaving the setting out keeps the earlier output. `profiles` now
serializes as null when not set, `"default"` clears a preset's value,
and Save PDF > Output lists Default first. Presets and stored settings
saved earlier hold `"profiles": "none"`, so exports from them now drop
image profiles.
When the Output settings convert colors, a color image whose pixel data
can't be read was left out with the "couldn't be converted" warning, as
if it could have been written in its own colors. Such an image can't be
written at all, so it is again left out with the "couldn't be decoded"
warning, as every other PDF export does. Only an image beyond the decode
allowance, or one whose header can't be read, is left out as
unconverted.
The importer kept a group's isolation only when something inside it
blended, so an isolated group or knockout group whose objects only
overprint read back without isolation. Written out again, it lost its
/I true and its overprinting objects then kept the inks of the art below
the group that they had covered. Isolation is now also kept when a
visible fill or stroke inside, or characters' fill or stroke, overprints,
directly or through children that do not isolate.
Port main's new variable-library parsing (variable kinds, image, visibility
and graph values) from roxmltree to craft-xml with the branch's strict
options and attribute validation. Keep both sides' variable tests.
Drop the stale docx::nesting doc link.
A test exports a knockout group that does not isolate, whose top element
overprints, and checks that its /K group carries no /I true, that the
overprinting graphics state (/OP, /op, /OPM 1) is written, and that the
overprint and the knockout group read back. An isolated group keeps
/I true.
An image in a four-component ICCBased color space opened with its ink
amounts but without the profile its color space holds, so PDF export
could not write it in that profile again.
- The profile is read from the color space stream (at most 16 MiB) and
kept when it is a well-formed CMYK profile. A CMYK TIFF carries it as
tag 34675; a CMYK JPEG kept as it is carries it in ICC_PROFILE APP2
segments in place of its own, with its compressed data unchanged, and
one whose segments cannot hold it is stored as a CMYK TIFF.
- jpeg_with_icc passes over fill bytes (0xFF before a marker, ITU T.81
B.1.1.2) and leaves them out of the output.
- A malformed, non-CMYK or larger profile leaves a decoded image's TIFF
untagged and a kept JPEG as it is. DeviceCMYK and DeviceN images stay
untagged.
- A CMYK TIFF's tag 34675 is read up to 16 MiB; before, a 4 MiB profile
was read back and a 16 MiB one was not. The comments of
tiff_icc_profile and source_icc give that limit.
A linear or radial gradient of CMYK stops drawn as an image (a dithered
fill, or a Perceptual gradient that is not written as a spot shading)
was written as an RGB image whenever any stop was linked to a spot
swatch, even a stop that colors nothing: one inside fully transparent
stretches, one out of order between stretches with no width, or one at
a tint of 0 without process plates. The spot color warning already
skipped those stops.
The image now falls back to RGB only when a stop prints a spot ink, the
same test the warning and the spot shadings use. A drawn spot stop at a
tint above 0, or with process plates, still gives an RGB image with the
warning.
A filled glyph joins a run of the same fill whatever its stroke, so with
fill and stroke rendering shown a glyph at a time, the stroke replayed
over the last glyph restyled the whole run: glyphs before it took its
cap, join and miter limit. When that stroke differs from the run's, the
glyph's text now splits off into a run of its own; the line's text is
unchanged, so slots, gaps and authored flags still line up.
Also record the change in the parity and roadmap docs.
Glyph strokes reached the type's character style as paint and width only,
so stroked PDF text (rendering modes 1, 2, 5, 6, and under ActualText)
came in with butt caps, miter joins and a miter limit of 10. The text
path now carries the graphics state's line cap, line join and miter
limit, taken as paths take them, and glyphs stroked with other ones start
a run of their own.
When the Output settings convert colors, an image whose pixels can't be
decoded or written in the destination's colors was written as it was, in
its own colors: a CMYK image with more pixels than CMYK inks are read for,
or a color image the writer could embed but the decoder could not read.
In PDF/X-1a that could also write a color space the standard forbids.
Such an image is now left out with the warning "an image couldn't be
converted to the Output destination and is missing from the picture".
Gray images, whose pixels are not converted, and files that convert no
colors keep the image as before. An image that can't be written at all
still gets the warning that it couldn't be decoded.
An sRGB destination converts tagged gray and RGB images to sRGB even when the
document's own RGB profile is sRGB, so the statement that the document's own
profile as destination keeps tagged images applies only to other RGB profiles.
With Convert to Destination and an RGB destination that is the document's
own RGB profile, RGB colors and RGB images keep their numbers, so an image
that carries an ICC profile keeps it. The export contract and progress line
now say so, and the test checks it.
Separations Preview and printed separations clamped a linked spot or
Registration tint to 0..1, but a NaN tint passed through the clamp and
reached the plate's coverage as NaN. A native file can store an infinite
tint (a number such as 1e39 read into an f32), and a blend between two
such paints yields NaN. A tint that is not a finite number now prints no
ink, as a gradient stop's process plate amounts already did; finite tints
are still clamped, and a stop's process plates still print beside it.
With Convert to Destination and an sRGB destination, a gray or RGB image
with an ICC profile whose pixels can't be decoded (a header past the
decoding allowance) was kept with its profile and no warning. It now
reports that the image is not converted. When the image is left out of
the file as well, only the warning that it is missing is given.
With Output › Convert to Destination and a CMYK destination, or an RGB
destination other than sRGB that images are converted to, an RGB image
that carries an ICC profile had its numbers read as sRGB, so a Display
P3 image came out with the wrong colors. Such an image is now converted
from its profile to sRGB with the color settings' rendering intent, then
to the destination.
- An untagged image converts from sRGB as before.
- A gray image keeps its profile, as gray is not converted.
- A profile the color engine can't read leaves the numbers read as sRGB,
with a warning.
- Preserve Numbers is unchanged.
docs/mcp.md, the document.exportPdf params text and the progress doc
describe the behavior.
With Output > Convert to Destination and an sRGB destination, a gray or
RGB image that carries an ICC profile (a Display P3 TIFF, a PNG or JPEG
with an embedded profile) is converted from that profile to sRGB with
the color settings' rendering intent and written without the profile.
Before, it kept its own numbers and profile.
- A 16-bit image that is not resampled or recompressed stays at 16 bits
a sample from PDF 1.5 on.
- A JPEG kept as JPEG whose samples the conversion leaves unchanged (an
sRGB profile) keeps its JPEG data; other JPEGs are encoded again.
- A black-and-white image whose converted levels are gray is compressed
as grayscale.
- A profile the color engine can't read is kept, with a warning.
- Without conversion, and with Preserve Numbers, images keep their
profile as before.
IccProfile::to_srgb_pixels converts a run of pixels in one pass.
Docs: docs/mcp.md, document.exportPdf params, target-app-parity.
An opaque knockout group in Normal mode with isolate off and nothing
blending inside was written as an isolated PDF knockout group (/I true
/K true), and a clipped one was drawn in an isolated form. The group's
elements now start from the art below it, as on the canvas: the /K
group carries no /I, and a clipped group gets no isolated form. An
isolated knockout group keeps /I true.
With linkPages and cropTo: crop, a PDF-compatible .ai opened on its crop
boxes, while opening it as art uses its trim boxes. It now uses the trim
boxes too. A page on its trim box shows its bleed box round the
artboard, and the pages' bleed (the widest on each side) becomes the
document's bleed, as the importer sets it.
Type on an open path can now start before the path's start: its start
is stored below 0, the span runs from there, and the characters whose
middle falls before the path's start are not drawn, as SVG 2 lays out
text on a path (https://www.w3.org/TR/SVG2/text.html#TextLayoutPath).
The text keeps every character, and the start bracket stays at the
path's start. Past the path's end, text that does not fit is overflow,
as for other type on a path. Type that starts on the path draws every
glyph as before.
- SVG import keeps a <textPath> start before an open path's start
(text-anchor end or middle, or a negative startOffset) instead of
starting the text at the path's start, which drew every character.
- SVG export writes it as a negative startOffset.
- PDF export writes only the characters drawn on the path.
- The legacy .ai and .ai editing data writers write the type from the
path's start with the type attributes warning.
- type.pathOptions takes a start below 0 for type on an open path; on a
closed path it is the path's start, as before. A flip starts the type
at its start bracket. Dragging the center bracket slides it from where
it starts, and no further before the path.
- A click at the path's start places the caret by the first drawn
character, and the caret in the hidden characters stands at the
path's start. The highlight of substituted fonts and glyphs leaves
them out.
- Release Type on a Path keeps the first drawn glyph where it was
drawn, with the hidden characters before it.
- The Touch Type tool shows no box for a hidden character, and
text.touchType returns an error for one. A character with a drawn
glyph is changed by that glyph.
Docs: docs/mcp.md, docs/target-app-parity.md.