Commit Graph
637 Commits
Author SHA1 Message Date
BFlat 2c1c36c77a Merge pull request #8632 from dotCooCoo/feat/cmx-open
File formats: open and place .cmx files
2026-11-19 15:07:21 +07:00
BFlat 49f5da65ae Merge pull request #7331 from dotCooCoo/feat/hpgl-options-dialog
HP-GL: Export As opens HP-GL Options for the version, pens, origin and path order
2026-11-19 14:48:03 +07:00
dotCooCoo 1c5f97acfc File formats: .cmx gray and CMY colors, unnamed layers, stricter chunk search
- Colors in the older color fields read gray (model 9) and CMY (model 4)
  as the .cdr reader numbers them, instead of opening as black.
- A dash pattern whose lengths are all 0 draws a solid line, as for a
  .cdr outline.
- A curve whose point field is too short for its count and is not whole
  points with their type bytes is left out as damaged, instead of reading
  coordinates as point types.
- A layer without a name comes in unnamed, and the importer names it by
  its place, as for a .cdr drawing.
- After stray bytes, a chunk id starts with a letter and may hold digits
  and spaces, and the id found must name a chunk the reader uses or have
  a length that fits its list. Padding is no longer taken for a chunk.
- A canvas or a container in an object's attributes gives the
  unsupported-objects warning.
- A page with no size and no bounds is 612 x 792 pt, VectorCraft's own
  size, as for a .cdr page; PROVENANCE R61 says so. PROVENANCE also names
  the other program's .cmx reader, read for field order.
2026-11-18 17:54:13 -08:00
dotCooCoo 4080708714 Merge main into feat/stylus-wheel 2026-11-18 17:25:37 -08:00
dotCooCoo c7d78a2dac File formats: open and place .cmx files
.cmx exchange files with 32-bit coordinates open and place as editable
art. vectorcraft-cdr reads the RIFF form CMX1, its header, the color,
pen, line type, dash, outline and arrowhead tables, and each page's
instructions in drawing order, into the drawing model the .cdr reader
uses, so the importer maps pages, layers, groups and curves with uniform
fills and outlines the same way. A layer that holds nothing is left out.
A page that gives no size of its own takes the size of the drawing's
bounds, which the page header stores, and is centered on them.

Text, images, rectangles, ellipses, clipping paths, fills other than
uniform ones and arrowheads are left out, and lenses are not applied;
the warnings name each kind, with rows in every complete catalog.
Big-endian files and files with 16-bit coordinates are refused with a
message. Layouts and their sources are rows R53 to R63 of
crates/cdr/PROVENANCE.md; tests use synthetic files only.
2026-11-18 15:52:44 -08:00
dotCooCoo 24d04bd50b Merge main into feat/hpgl-options-dialog 2026-11-18 15:10:32 -08:00
dotCooCoo c103a88649 Merge main into feat/cdr-import-all 2026-11-18 14:27:18 -08:00
jmvergesandClaude Opus 5.5 3d2bbf5d69 Merge main (4cae5249e) into fix/ai-grouped-clipping-paths-in-compound
Conflicts in docs only (status lines, changelog rows and table rows):
main's entries and this branch's are both kept, each once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 18:21:32 +00:00
bflatastic d5bba7d311 combo: #8549
# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-19 01:13:07 +07:00
bflatastic da922c49e3 Merge main into #8240
# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-19 01:06:40 +07:00
dotCooCoo c1c2619146 Merge main into feat/cdr-import-all 2026-11-18 08:21:04 -08:00
dotCooCoo 18c4a7b965 Merge main into feat/stylus-wheel 2026-11-18 07:27:22 -08:00
dotCooCoo 9a9cdd95fd Merge main into feat/hpgl-options-dialog 2026-11-18 05:56:58 -08:00
HassanKhan d9a404f91b PDF import: no stroke match over lines finished past the limit (#8543)
Answers the fourth CodeRabbit review on #8549.

When a fill pass finishes lines beyond MAX_PARKED, their unstroked
glyphs are recorded (bounded at 4096). The first stroke after that
which could have gone over one of them ends the stroke pass, so a TJ
over more than 65 lines that comes back to where it began stays a
filled object and a stroked one for each part, as documented. Any
other first stroke drops the record, so type after an overflowing TJ,
filled only or not, is matched as before.

MAX_HELD's doc now says that one operator filling the same run of more
than 4096 glyphs twice at the same places is matched as well as it can
be: the reader tells no operator's start.
2026-11-18 16:03:34 +05:00
HassanKhan f23eb05224 PDF import: keep stroke boundaries in the fallback and long passes (#8543)
Answers the third CodeRabbit review on #8549.

- stroke_last no longer restyles the glyph drawn last once a boundary
  (end_fills) closed it: a stroke after an ActualText span no longer
  strokes its replacement text. A glyph stroked again where it was just
  drawn still stays one object.
- Past MAX_HELD, the held strokes go over the last run of consecutive
  fills they match with room for all of them, not the first, so a long
  stroke pass no longer takes the same glyphs an earlier operator
  filled at the same place.
- Docs: the limit is 64 kept-back lines plus the open one, so a TJ over
  up to 65 lines stays filled and stroked.
2026-11-18 15:27:08 +05:00
HassanKhan 8796b773ec PDF import: a stroke pass matches only glyphs filled since its last boundary (#8543)
Answers the second CodeRabbit review on #8549.

- A stroke that goes over no filled glyph (stroked type of its own) and
  the start and end of an ActualText span now end the stroke pass
  (Builder::end_fills): the held strokes are matched, the parked lines
  finished and the open line's fills closed, so a later stroke can't go
  over an earlier fill and a later span keeps its own replacement text.
- ActualText fills are ordinary entries in the line's fill list, and
  span strokes are held and matched in replay order like any other, so
  an A/B/A TJ in a span strokes the replacement. The actual_fills map,
  stroke_parked and has_actual_fill are gone.
- Past MAX_HELD, the held strokes are matched to the first run of
  glyphs filled one right after another that they go over
  (Builder::replayed), with bounded work, instead of each to its first
  match, which could reach an earlier operator's fill.
- Docs state that past 64 lines in one operator each part stays a
  filled object and a stroked one.
2026-11-18 14:46:42 +05:00
HassanKhan b3fd70bc52 Merge remote-tracking branch 'upstream/main' into fix-8543-pdf-tj-fill-stroke
# Conflicts:
#	docs/file-format-parity.md
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-18 13:12:26 +05:00
HassanKhan e318f6cc67 PDF import: match a stroke pass to the glyphs filled last, in fill order (#8543)
A TJ can draw the same glyph at the same place twice (its kerning goes
back), so a stroke can't be matched to a filled glyph as it arrives:
[(A) -3500 (B) 4834 (A)] TJ put the first A's stroke on the last A and
left the earlier parts unstroked. Strokes over filled glyphs are now
held until their stroke pass ends and then matched to the glyphs filled
last, in the order they were filled, so each copy is stroked where it
was filled, while a glyph filled and stroked where one filled before
stands still strokes only the newest. At most 4096 strokes are held.

Docs: ordinary text gives one filled and stroked object per part; in an
ActualText span it stays one replacement object on the first glyph's
line and style.
2026-11-18 13:02:58 +05:00
HassanKhan 851c7cb372 PDF import: a TJ whose kerning starts a new line comes in filled and stroked (#8543)
The reader fills every glyph of a text-showing operator, then strokes
them. When a TJ's kerning started a new line part way through, the
first line was finished before the stroke pass came back to it, so its
strokes found no filled glyph and came in as stroke-only type over
fill-only type.

A line a glyph doesn't fit is now parked while a stroke may still be
drawn over it, and a stroke-only glyph is matched against the open line
and then the parked lines, newest first. Parked lines are finished
oldest first before the open line, so drawing order is kept, and at
most 64 are parked.
2026-11-18 12:23:10 +05:00
HassanKhan 0865242d2f PDF export: write the document language as the catalog's /Lang (#3644)
The writer passed no language to craft-pdf, so exported and printed
PDFs had no /Lang and accessibility checkers failed primary-language.
Writer::new now passes the BCP 47 tag of the Document Setup language
(new vectorcraft_doc::setup::language_tag, en-US by default) through
write::Writer::new_with_language, which writes the catalog's /Lang and
the XMP dc:language. A language with no tag writes none. /MarkInfo is
left for tagged PDF (#3643).
2026-11-18 11:46:27 +05:00
dotCooCoo cc312e66f3 Merge main into feat/hpgl-options-dialog 2026-11-17 22:11:27 -08:00
BFlat 17e1aa67e1 Merge pull request #8362 from dotCooCoo/feat/place-pdf-link-default
Import PDF: All checks Import PDF pages as links and Range clears it
2026-11-18 12:57:32 +07:00
BFlat 4d3f9cbd08 Merge pull request #7365 from dotCooCoo/fix/ai-scatter-brush-art-upright
.ai import and save: Scatter brush art comes in turned over, as Art brush art does
2026-11-18 12:55:47 +07:00
dotCooCoo d4e43bab3b Docs: the formats summary row counts .cdr and PostScript among the formats opened
The table opens and places PostScript through the EPS reader, so PS
leaves the missing list, and .cdr drawings now open: 33 formats, missing
FreeHand and DWG.
2026-11-17 21:28:29 -08:00
dotCooCoo dace34d9a8 Merge main into feat/cdr-import-all 2026-11-17 20:24:50 -08:00
dotCooCoo 5fc4a063a5 Merge main into feat/hpgl-options-dialog 2026-11-17 19:34:58 -08:00
BFlat 3dfd692304 Merge pull request #8078 from dotCooCoo/feat/text-import-character-sets
Text Import Options: Character Set offers the other documented encodings
2026-11-18 10:31:10 +07:00
dotCooCoo 09b7f6c3ce Merge main into feat/stylus-wheel 2026-11-17 12:36:31 -08:00
BFlat ee60c51fd9 Merge pull request #8323 from dotCooCoo/fix/psd-cmyk-placement
Fix #8316: preserve CMYK PSD images when placed or relinked
2026-11-18 03:23:55 +07:00
BFlat a18fef053f Merge pull request #8288 from dotCooCoo/fix/metafile-loss-warnings
Metafile import: warn about images, clips and raster operations the reader leaves out
2026-11-18 03:22:29 +07:00
BFlat aa8ef006da Merge pull request #7446 from dotCooCoo/fix/ai-transform-guide-reach
.ai import: guides past an object's art keep the drawn look under Transform and Free Distort
2026-11-18 03:20:32 +07:00
dotCooCoo 2733c8c85c Merge main into fix/ai-scatter-brush-art-upright 2026-11-17 09:41:16 -08:00
dotCooCoo 99cb4f4190 Import PDF: All checks Import PDF pages as links and Range clears it
File > Open's Import PDF dialog now starts with Import PDF pages as links
checked for All, so every page of a PDF opened from its file opens
linked, and clears the box when Range is picked, so a range opens as
art. A box checked or cleared by hand keeps that state until the other
of All and Range is picked; ui.dialog.set of allPages does the same.
The box stays clear for a file without its path, with a password, or
over the 256 MB that linkPages takes (fileio::pages_can_link).

Docs: docs/mcp.md, docs/target-app-parity.md, docs/file-format-parity.md.
2026-11-17 09:30:55 -08:00
jmvergesandClaude Opus 5.5 e5571b5c15 Merge main (36b5a5920) into fix/ai-grouped-clipping-paths-in-compound
Conflicts in docs only (the status lines, the changelog rows, the M4 Files
row and the File formats rows): main's entries and this branch's are both
kept, each once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:10:15 +00:00
jmvergesandClaude Opus 5.5 518301e848 Merge main (36b5a5920) into fix/ai-pattern-fill-in-an-art-style
Conflicts in docs only (the status lines, the changelog rows, the M4 Files
row and the File formats rows): main's entries and this branch's are both
kept, each once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:10:15 +00:00
dotCooCoo cce26edfa0 Merge main into fix/metafile-loss-warnings
# Conflicts:
#	Cargo.toml
2026-11-17 07:25:38 -08:00
BFlat 271a28840c Merge pull request #8246 from dotCooCoo/feat/ai-editing-data-meshes
.ai save: the editing copy keeps gradient meshes
2026-11-17 21:32:35 +07:00
dotCooCoo badaf937e3 Fix #8316: preserve native CMYK PSD composites 2026-11-17 06:19:51 -08:00
BFlat c4163015d9 Merge pull request #8311 from Hassan1305/fix-8300-pdf-fill-only-after-stroke
PDF import: a glyph filled only after one filled and stroked stays unstroked
2026-11-17 19:51:28 +07:00
dotCooCoo 21feb686cf Merge main into feat/ai-editing-data-meshes 2026-11-17 04:04:45 -08:00
dotCooCoo 14d814b9f0 Merge main into feat/stylus-wheel 2026-11-17 03:57:49 -08:00
BFlat b016b56635 Merge pull request #7357 from dotCooCoo/fix/ai-brush-mask-art
.ai editing data: Scatter and Art brushes keep their art's opacity masks
2026-11-17 18:49:43 +07:00
HassanKhan 007180e2f3 PDF import: a glyph filled only after one filled and stroked stays unstroked (#8300)
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.
2026-11-17 15:59:49 +05:00
jmvergesandClaude Opus 5.5 911efc9549 .ai import: a stack's pattern the drawn look places two ways keeps the look
The check that a stack's patterns are each its own took each style item's
pattern once, but not that the drawn look places it one way:
`placed_paints` keeps a pattern's first placement, so a look filling with
one pattern at two placements, for a style that names it once, came in
with the first placement for both. `placed_paints` now also notes each
pattern the look places otherwise than its first placement, and a stack
with such a pattern keeps its drawn look. The same placement again, as a
compound path's look has for each subpath, is still one.

Test `a_look_placing_a_stacks_pattern_twice_keeps_the_drawn_look` (two
placements keep the look; the same one twice comes in as the path).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:42:52 +00:00
jmvergesandClaude Opus 5.5 3ae72821b4 docs: a path or compound path filled with a pattern through its art style comes in with it (.ai import)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:42:51 +00:00
jmvergesandClaude Opus 5.5 6d3c56ccb1 docs: clipping paths grouped in a compound path (.ai import)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:42:47 +00:00
dotCooCoo 566d5263b9 Merge main into feat/ai-editing-data-meshes 2026-11-16 23:38:43 -08:00
dotCooCoo c61d429df2 Merge main into fix/ai-brush-mask-art 2026-11-16 23:36:04 -08:00
HassanKhan b12bacf3c8 Merge remote-tracking branch 'upstream/main' into fix-8015-pdf-text-fill-stroke
# Conflicts:
#	docs/roadmap.md
#	docs/target-app-parity.md
2026-11-17 12:34:29 +05:00
BFlat 6a2fa16cd1 Merge pull request #8289 from dotCooCoo/feat/ai-blends-in-editing-copy
.ai save: the editing copy keeps live blends
2026-11-17 14:32:25 +07:00