Commit Graph
717 Commits
Author SHA1 Message Date
BFlat d48c4207f7 Merge pull request #9102 from dotCooCoo/feat/colorized-image-overprint
Images: Overprint Fill makes a colorized image's color overprint
2026-11-24 16:39:55 +07:00
dotCooCoo 116a8c2411 Overprint: a white spot ink keeps overprinting with Discard White Overprint
With Discard White Overprint on, PDF export, Overprint Preview,
Separations Preview and printed separations took the overprint off any
white paint, including a tint above 0% of a spot swatch whose color is
white, which prints as that ink. Such a tint now keeps its overprint in
fills, strokes, character paints and a colorized image's color; process
white and a 0% tint still knock out.

DiscardWhite holds the setting and the document's spot inks, and
Document::discards_white_overprint gives the same answer for the PDF and
EPS writers.
2026-11-24 00:45:00 -08:00
dotCooCoo 5a82ba3742 Overprint Preview: a colorized image showing a full-color preview keeps knocking out
A linked image whose file is missing shows its full-color preview as it
is, without its colorize paint, and separations and PDF export already
print it that way. Overprint Preview and simulated overprints in
composite output still darkened the whole image. darken_overprints and
image_overprints_whole now take the document's images and leave such an
image at its own blend mode, and the helpers that find the pixels a
colorized image shows move from the separations code to
vectorcraft_doc::overprint so both use them. The preview's cached art is
made again when the document's images change.
2026-11-22 23:07:34 -08:00
dotCooCoo a6572d450a Merge main into feat/colorized-image-overprint 2026-11-22 22:38:01 -08:00
dotCooCoo 94c4bfba7a Tests: a linked image inside a placed document follows this document's outline setting
A placed file whose own Show Images in Outline Mode is off shows its linked
image's pixels in grayscale, uncrossed, when this document's setting is on.
2026-11-22 20:33:43 -08:00
dotCooCoo 97ac3c8c8b Outline view: linked images and placed documents show their box with an X
In Outline mode, with File > Document Setup > Show Images in Outline Mode
off, a linked image's frame is crossed from corner to corner, following
the corners of a turned or distorted image. A placed document shows its
box crossed, and its file's art no longer draws in Outline mode unless
the option is on. Embedded images keep a plain frame, and so do the
pieces that an envelope cuts an image into.

A placed document with raster effects or color adjustments stays
crossed. One with an effect that changes geometry, its own or its
group's, still draws its file's art reshaped and is not crossed yet.

With the option on, images show their pixels in gray and placed
documents show their art. The art inside a placed document now follows
the option of the document it is placed in rather than the placed
file's own setting.

Linked files showing as a box with an X in Outline mode is described at
https://helpx.adobe.com/illustrator/using/viewing-artwork.html; the
other rules are VectorCraft's own.

Docs: docs/ui-parity.md, docs/mcp.md; document.setup params text for
outlineImages.
2026-11-22 19:49:08 -08:00
5af36bae87 Fix #4568: PDF import keeps embedded fonts for text whose family isn't installed (#4569)
* PDF import: keep embedded fonts for text whose family isn't installed

Glyphs drawn in an embedded font whose family isn't available are gathered
during import and built into one small TrueType font per family and style,
kept with the document (font/ttf blob). Text objects record the fonts and a
hash of their text: layout and rendering draw them in the kept font until the
text is edited (undo restores it) or the family is installed. Lines are
spaced against the file's own widths with per-glyph placement (#3756).

* PDF import: satisfy crate layering constraints without format dev-dep

* FileFont: negate us_win_descent in i32 to prevent overflow on extreme negative descenders

* PDF import: a kept font carries the file font's licence flags, and the docs say what that means

Review of #4569: the fsType of the file's font is copied to the font built from its glyphs (a test pins it against Embedding), so exports honour it; the docs state the limits, that the file's font program is not parsed, and that a saved file carries third-party glyphs.

* PDF import: a glyph curve far outside any glyph is left out; docs say what the limits and the font program mean

CodeRabbit on #4569: coordinates beyond 1e6 font units are refused before the curve is subdivided. The docs say the 64-font limit is what draws one type object and that the file's font program is read only for its licence flags and metrics.

* PDF import: two programs of one font keep the stricter licence flags; the docs cite their sources

CodeRabbit on #4569: embedded programs of one family and style share one built font, which kept the first program's fsType; it now takes the stricter of the two, whichever came first. The docs entry cites the Acrobat Help pages and the OpenType fsType specification.

* fmt

* PDF import: embedded fonts are on by default, with an opt-out preference

Owner decision on #4568. Preferences > File Handling > Use fonts embedded in imported PDFs (pdfImportEmbeddedFonts, on by default) and the embeddedFonts param of document.open and file.place: off, a PDF's type in a font the machine lacks is set in the fallback font with the missing-font warning, as before. One test each for on and off, one for the preference reaching the options.

* fmt after merging main

* docs: restore the status lines damaged by merges (main's line plus this PR's note)

* PDF import: set embedded_fonts through a builder method (keeps read_opened under the complexity limit)

* PDF import: move the missing-font notes out of read_opened (complexity limit after the merge)

* #4569: isolate file-font resources and reclaim live faces (UNVERIFIED)

* Preserve carried-font ownership across placement and recovery

* Fix carried-font regression test dependencies and unwind probe

* Use explicit OS2 heights in owned-font reference regression

* Keep native font regression artwork inside document layers

* fix(engine): bind file fonts when reading document profiles

* test(engine): initialize file-font leases in new image fixtures

* test: complete file-font lease initialization in image fixtures

* docs: keep the #4568 entry in the file-format parity status line

* fix(pdf): keep a line with another glyph for the same character as outlines (review)

A font kept with the document has one glyph per character. A glyph of the file's font that
differs from the one already kept for its character (a stylistic alternate that maps to the same
Unicode scalar) marks its line, which is imported as outlines so each glyph draws as the file
does.

* docs: resolve the leftover status-line conflict

* Placed document blob: give the new ImageBlob literal its file_font

* Test: a PDF's two glyphs for one character survive a native save and reopen as the file draws them

* Test: move the native save and reopen half of the two-glyphs regression to the engine (layers: no format dev-dep in pdf)

* Fix embedded-font preference help and English fallback checks

* Format embedded-font preference help with the workspace edition

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: skylartaylor <hi@skylar.cc>
2026-11-22 18:18:18 -06:00
dotCooCoo e3d10ec15e Images: colorized image overprint keeps main's white rule and skips painted effects
White now follows the rule main has for white fills: with Discard White
Overprint on, PDF export, the previews and printed separations knock a
white color out, and EPS export turns overprinting on as it does for
fills and strokes. The changes to EPS output for white fills and to white
spot inks are no longer part of this change.

- The previews and printed separations treat an image with a visible
  drop shadow, outer glow or Gaussian blur of its own as knocking out, so
  the effect is not darkened or hidden with the image.
- Legacy .ai reading takes an image mask's fill overprint only from an O
  written after the previous object, not from the path before it.
- A fill of None, which takes the color off, also turns its overprint off.
- On a PostScript separation plate, an overprinting image whose color puts
  none of the plate's ink down is left out while a fill or stroke of it
  still draws, and an image that does not overprint as a whole knocks out.
- PDF export writes an overprinting gray color as an image of black ink
  alone, so the other process inks below it stay.
2026-11-22 08:48:09 -08:00
dotCooCoo 4f73ef7fbb Images: Overprint Fill makes a colorized image's color overprint
A grayscale or 1-bit image colorized with a fill color had no way to
overprint: object.setOverprint {fill: true} changed nothing, since an
image has no fill row. The color now carries its own overprint flag
(colorize_overprint in native files).

- object.setOverprint (fill, without item) and attributes.info set and
  read it; Overprint Black and Print Ink Fixes' Remove White Overprint
  treat the color as the image's fill.
- Overprint Preview, Separations Preview and printed separations show
  the inks below the image where its color has none; on a plate the
  color puts no ink on, the image is left out.
- PDF export draws the image in an overprinting graphics state, a
  process color as an image of only the process inks it puts down.
- EPS export turns overprinting on for it, and now leaves white fills,
  strokes and colorized images knocking out with Discard White
  Overprint, as PDF export does.
- A legacy .ai file writes it as the image mask's fill overprint and
  reads it back. Warped pieces, geometry-effect copies and flattening
  keep or drop it as they do for fills.
- A white spot color is an ink: with Discard White Overprint it keeps
  overprinting in PDF and EPS export and in both previews.

Docs: docs/mcp.md (Overprint, Print Ink Fixes), docs/target-app-parity.md.
2026-11-22 06:15:41 -08:00
dotCooCoo 5adeec1151 Save for Web: a Custom table keeps shifted and locked colors first, and 255 opaque colors beside transparent pixels
- With transparent pixels, a fixed palette's colors mapped to
  transparent share the transparent pixels' slot, so at Colors 256 all
  255 opaque colors keep their entries.
- The preview's mappedToTransparent lists a color mapped to transparent
  that did not fit in the fixed palette when its pixels became
  transparent.
- When Colors leaves a fixed palette fewer slots than it has opaque
  colors, shifted colors keep their slots first, then locked ones, then
  the others in palette order. The file keeps the palette's order.
- quantize::nearest_entries hands each pixel's entry to a callback
  instead of collecting one per pixel.
- A GIF lossy test with one fixed entry of three.

Docs: params text, docs/mcp.md.
2026-11-20 21:51:57 -08:00
dotCooCoo 82ef5176bc Merge main into feat/distort-images 2026-11-19 06:39:02 -08:00
dotCooCoo 55438151f3 Merge main into feat/distort-images 2026-11-19 06:08:29 -08:00
dotCooCoo dafade6173 Merge main into feat/proof-setup-customize
# Conflicts:
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/i18n/tests.rs
2026-11-19 05:04:12 -08:00
dotCooCoo 0c74698e55 Render: RenderOptions::hidden is a set, so each hidden check is one lookup
RenderOptions::hidden was a Vec<NodeId>, and the renderer checked each
node it visits against it with contains (node_checks::left_out and
Renderer::draw_node), so every check could compare against all k
hidden ids. The Fold Preview print hides every non-printing layer and,
with Show Fold Lines off, every object with a line role.

hidden is now a HashSet<NodeId>, so each check is one hash lookup. The
Fold Preview collects print_hidden's list into the set, and two tests
that built the field with vec! build it from an array. The field's doc
comment now names the Fold Preview print as its example.

New test a_render_leaves_out_every_object_of_a_large_hidden_set renders
2,000 strips with 1,000 of them in hidden and checks every strip's
pixel. It checks that hiding still works for a large set; the old Vec
drew the same pixels, so the test does not fail at run time without
the change.
2026-11-19 01:49:55 -08:00
BFlat 2769afa489 Merge pull request #8540 from dotCooCoo/fix/classic-overprint-separations
Separations Preview: keep Classic 3D black shading on the Black plate
2026-11-19 15:01:48 +07:00
BFlat 4c1b27bc41 Merge pull request #8178 from dotCooCoo/feat/image-trace-split-view
Image Trace: Split View shows the source image and the result on either side of a divider
2026-11-19 14:56:07 +07:00
dotCooCoo 3f253b4da2 Merge main into feat/distort-images 2026-11-18 18:48:32 -08:00
dotCooCoo 621c06bd26 Free Transform: distorted images keep their corners and placement through files, exports and refusals
- A file's corners are kept only when there are exactly four that the
  image can take; a longer list is skipped without decoding it. Corners
  the affine map misses stay a distortion, and a scale past the
  perspective limit leaves the image at its nearest affine placement.
- Distort checks the corners in a frame local to the quad, so a missed
  corner far from the origin is still refused.
- Relink and Unembed refuse a named or selected distorted image before
  searching a folder or writing a file. Create Gradient Mesh lists the
  distorted images it leaves in `skipped`. Place with Replace refuses
  only when the measured image is distorted and the file is not text.
- SVG cuts a distorted image in a scaled symbol instance at the placed
  size. EMF pieces store only the pixels inside their clip. PDF mesh
  pieces of a CMYK image keep a same-corner mask as its soft mask, color
  mask included. Both `.ai` writers write an image at the nesting limit
  at its nearest placement with a warning. DXF warns only when it writes
  the image.
- The canvas cuts the mesh by the view's largest stretch. Warped images
  with a singular placement keep finite corners.
- docs/mcp.md and docs/plugins.md describe the tolerances, the DXF and
  WMF fallback, the partial result of Create Gradient Mesh, and when a
  plug-in sees `corners`.
2026-11-18 17:13:56 -08:00
dotCooCoo f4071dd56a Merge main into feat/image-trace-split-view 2026-11-18 15:58:59 -08:00
dotCooCoo f1542e5af0 Merge main into feat/proof-setup-customize 2026-11-18 13:13:29 -08:00
dotCooCoo a877d4bef7 Merge main into fix/classic-overprint-separations 2026-11-18 10:41:33 -08:00
dotCooCoo 18c4a7b965 Merge main into feat/stylus-wheel 2026-11-18 07:27:22 -08:00
dotCooCoo 1521a682eb Proof Setup: mask images in a pattern's tile are not proofed
A pattern's tile drawn for a proof that preserves the colors' numbers
kept the proof's image tables for its opacity masks, so a mask's image
was proofed and the mask covered differently than outside a pattern.
The mask now leaves its images as they are when the tile's ink carries
that proof, as it does for the frame's proof.
2026-11-18 06:53:28 -08:00
dotCooCoo fdd0b2fdb3 Merge main into fix/classic-overprint-separations 2026-11-18 06:33:44 -08:00
yoriswind 390203c35b 6582: resolve status documentation after the Blend fix merged 2026-11-18 05:13:11 -08:00
BFlat dce8a0c05e Merge pull request #7065 from yoriswind/codex/5179-blend-spine-redraw-bounds
Fix redraw bounds for blends following a curved spine
2026-11-18 19:58:54 +07:00
yoriswind 91898148d6 6582: preserve Eraser behavior with current upstream documentation 2026-11-18 04:55:12 -08:00
yoriswind 1d28f45f58 6582: retain fitted gradients beneath enclosing geometry effects 2026-11-18 04:39:25 -08:00
yoriswind 56b4fcb8c6 Fix redraw bounds for rotated Blend effects
Measure effect-bearing Align to Path content after spine placement, retaining
the conservative envelope and covering damage containment with original
software-rendered move and Undo controls.
2026-11-18 03:19:27 -08:00
yoriswind 3f09579dcd Merge upstream main to resolve PR #6601 documentation conflicts 2026-11-18 02:41:17 -08:00
dotCooCoo 45835405a5 Merge main into feat/distort-images 2026-11-18 01:42:11 -08:00
yoriswind a9b4015e40 Merge pinned current main for the confirmed #7065 bounds repair 2026-11-18 00:37:17 -08:00
dotCooCoo c8fb9bdf05 Merge main into fix/classic-overprint-separations 2026-11-17 23:53:25 -08:00
dotCooCoo 9357a71375 Merge main into fix/classic-overprint-separations 2026-11-17 21:51:14 -08:00
dotCooCoo ee0a28845f Keep Classic 3D black shading on its separation plate 2026-11-17 21:47:15 -08:00
dotCooCoo 0b1ba1c6ef Merge main into feat/proof-setup-customize 2026-11-17 20:24:50 -08:00
dotCooCoo 8486bd1892 Save for Web: pixels of a transparent color that does not fit in a fixed palette stay transparent
With transparent pixels and Colors at 256, a custom palette of one opaque color and 255 colors mapped to transparent has no room for the last of those, and its pixels took the nearest entry left, which could be the opaque color. Such pixels now take the transparent entry when their nearest color is one that did not fit.
2026-11-17 18:27:15 -08:00
yoriswind 0dd87f8921 Merge main into the qualified Eraser group-stroke repair 2026-11-17 17:40:53 -08:00
dotCooCoo dc30166813 Merge main into feat/save-for-web-delete-color 2026-11-17 16:25:37 -08:00
dotCooCoo ad03873c06 Merge main into feat/distort-images 2026-11-17 16:21:37 -08:00
dotCooCoo 949171b715 Save for Web: GIF lossy moves no pixel into or out of a shifted color
Lossy compression compared each pixel with the reduction's colors, so a pixel next to a color shifted by hand could join that color and be written in its new color, and a pixel of the shifted color could leave it. Lossy now leaves the entries of shifted colors alone, as it does the transparent entry.
2026-11-17 15:32:51 -08:00
dotCooCoo c9812414ce Merge main into feat/save-for-web-shift-color 2026-11-17 13:00:56 -08:00
dotCooCoo 09b7f6c3ce Merge main into feat/stylus-wheel 2026-11-17 12:36:31 -08:00
BFlat 1f84febb08 Merge pull request #8169 from dotCooCoo/fix/symbol-lookup-index
Symbols: render and SVG/PDF export find each instance's symbol in one index
2026-11-18 03:23:44 +07:00
dotCooCoo 54e8d3046e Save for Web: Delete Color removes colors from the color table
The color table's trash button and Delete Color in its new menu delete
the selected GIF or PNG-8 colors. Pixels that used a deleted color take
the nearest color left, with the current reduction's color distance and
dither, and the preview matches the saved file. A click selects one
color and makes it the anchor, Shift-click selects the range from the
anchor, and Ctrl-click (Command-click on macOS) adds or removes one.

- colorTable.deleted lists the deleted colors by source. A deleted color
  leaves the locked, transparent and webShift lists.
- colorTable.customPalette fixes the palette at the first deletion, so a
  deleted color is not made again; the table reads Custom. Restore
  Generated Table in the menu, or another reduction, clears both.
- Deleting every opaque color, or every color not mapped to transparent,
  is an error and changes nothing.
- Presets and the remembered settings keep the edit.
- quantize_to uses all 256 fixed colors when no pixel is transparent.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-17 12:23:26 -08:00
bflatastic 82c9631b57 Render: a gradient mesh past any buffer draws without flattening its outline
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
2026-11-18 01:41:52 +07:00
dotCooCoo 4373826cc6 Free Transform: Perspective Distort and Free Distort put an image's corners on the handles
Perspective Distort and Free Distort (`object.distort`) used to give an image
only the warp's affine approximation at its center, so its corners did not
follow the handles and it drifted away from paths warped with it.

- An image's four corners now go exactly where the warp takes them, alone or
  in a mixed selection. A parallelogram stays in the image's transform; any
  other shape is kept in the new `image_quad` field of the native file, which
  older files do not have and still open as before.
- Corners that would fold the image over, fall on one line, cross the warp's
  horizon or lie too close together for a perspective map are an error, and
  nothing changes. A file whose corners break these rules opens with the image
  placed by its transform. A drag is one undo step, and a distort that leaves
  the corners where they are records none.
- Bounds, hit testing, transforms, Transform effects, blends, the Eyedropper,
  Outline view, the Color Theme Picker and Weed Box and Lines follow the
  corners. Image info measures the resolution at the image's middle, and
  plug-ins get the corners.
- The canvas, printing and every exporter draw a distorted image as a mesh of
  affine image pieces through the shared mesh warp, clipped by the corners.
  In files and print the mesh aims to stay within 0.05 pt with cells of at
  least 2 pt; the canvas cuts it for the zoom, within a quarter of a pixel
  with cells of at least 4 pixels. Pieces reach into their neighbors (0.5 pt,
  or 2 pixels on the canvas), so the image stays opaque at every zoom. The
  mesh has at most 64 by 64 cells and no more cells across than the image
  has pixels on its longer side (at least 8). No warped copy of the pixels is
  stored. DXF and WMF write the nearest parallelogram and warn.
- Crop Image, Image Trace, Relink, Embed, Unembed, Create Object Mosaic,
  Create Gradient Mesh and Place with Replace refuse a distorted image with an
  error that names the distortion. Update Links puts a changed file's pixels
  between the same corners, without applying Placement Options. Mask follows
  the corners. Rasterize makes a plain image of it.
- The new error messages have rows in every complete-message catalog.

Docs: docs/mcp.md, docs/plugins.md, docs/target-app-parity.md.
2026-11-17 08:46:08 -08:00
yoriswind 4c764b2912 Merge main and retain qualified changes for #7065 2026-11-17 05:51:24 -08:00
dotCooCoo 14d814b9f0 Merge main into feat/stylus-wheel 2026-11-17 03:57:49 -08:00
yoriswind df92153483 Merge upstream main and retain independent progress documentation 2026-11-16 23:59:16 -08:00