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).
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.
- 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.
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.
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.
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.
- EPS CCITTFaxDecode goes back to hayro-ccitt (main's filters.rs and data.rs):
craft-stream-codecs decodes /K -1 /Columns 70 data to other rows
(eps import::tests_images::ccitt_fax_images_draw). DCTDecode is main's again.
- The AI editing writer decodes through the image crate again: going through
RGBA8 lost 16-bit sources, so their 8-bit warning disappeared
(ai_editing::tests::sixteen_bit_images_are_written_at_eight_bits).
- Crop Image refuses an image over its allowance by header size again, with
main's "an image of W × H pixels is too large to draw" message.
- Test fixes: colorized_images writes its gray PNGs gray again, and the PDF
16→8-bit test expects rounding, as the 8-bit copy is made.
- Test files whose image→craft-image-codecs rewrites didn't compile against
main's newer tests go back to main's versions (engine fileio/tests.rs,
tests_tiffbmp.rs, tests/menucmds.rs, eps tests.rs); they still use the image
crate, which keeps its format features.
- craft_jxl::encode, craft_image_codecs::encode and Image::icc at d6cd7836d.
- jp2read and pdf export pass DecodeOptions, not Limits.
- EPS DCTDecode: grey JPEGs no longer use the image after moving it, and keep
main's one-channel output.
- svg keeps its direct usvg dependency for main's image href code; pdf keeps
jpeg-encoder for CMYK JPEGs.
- clippy -D warnings and rustfmt clean.
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.
Conflicts resolved in favour of main/#7664 in the 13 source files both touched
(doc/cmyk.rs, metafile/dib.rs, pdf images, svg import/files.rs, render paint and
encode tests, trace, engine load.rs), keeping main's newer TIFF/CMYK, DIB and PDF
image fixes. vectorcraft-doc stays on main's version until its CMYK reader moves
to craft-tiff. The image crate keeps its format features, and usvg, tiff,
zune-jpeg, hayro-ccitt and jpeg-encoder stay for the readers not yet moved.
Codec crates pinned to craft-libs d6cd7836d364177661b0ae17f48a0805e83a5f32.
Also fixes the compile errors CodeRabbit flagged (jp2read DecodeOptions,
filters.rs use-after-move) and the encode() arity at d6cd7836d.
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.