Commit Graph
679 Commits
Author SHA1 Message Date
BFlat 499903878e Merge pull request #7055 from dotCooCoo/feat/mojikumi-presets
Type: the Mojikumi Set menu offers the predefined spacing sets
2026-11-13 13:17:36 +07:00
BFlat 6c3022d6e1 Merge pull request #7008 from jmverges/fix/6983-import-font-exact-postscript-name
.ai and EPS import: type takes the face of its exact PostScript name and version
2026-11-13 12:27:09 +07:00
dotCooCoo 7b6b6af7b1 Type: the Mojikumi Set menu offers the predefined spacing sets
The Paragraph panel's Mojikumi Set lists None, YakumonoHankaku,
GyomatsuYakumonoHankaku, GyomatsuYakumonoZenkaku and YakumonoZenkaku,
then Line-end Punctuation Half Width, and text.setFormat {mojikumi}
takes yakumonoHankaku, gyomatsuYakumonoHankaku, gyomatsuYakumonoZenkaku
and yakumonoZenkaku besides none and lineEndHalf.

The spacing of each set is VectorCraft's own rule, built on the help
page's one-line description of each set:
- YakumonoHankaku sets every bracket, comma and full stop half width,
  takes a quarter em off each side of a middle dot, and puts a quarter
  em between Japanese and Latin letters or digits.
- GyomatsuYakumonoHankaku keeps punctuation full width inside a line,
  sets an opening bracket starting a line flush and a closing mark
  ending it half width, and takes the quarter em after a middle dot
  ending a line off.
- GyomatsuYakumonoZenkaku keeps punctuation full width and adds the
  quarter em between Japanese and Latin text.
- YakumonoZenkaku sets characters as None does.

Both composers and vertical type measure each line as it is set. A
right-to-left paragraph, whose line ends are measured untrimmed, also
draws them untrimmed, and a right-to-left line that ends between a
Japanese and a Latin character is measured without the quarter em the
set adds there. With a Desired glyph scaling other than 100%, the
space a set takes off before an opening bracket or middle dot, and the
Japanese-Latin space recorded at a line's end, scale with the glyph.

The sets save with the document and paragraph styles; new type and
Reset Panel keep Line-end Punctuation Half Width. SVG export lays type
with middle dots out again for its positioned spans. A .ai save
reports a paragraph with one of the new sets as left out.

Docs: docs/mcp.md, docs/target-app-parity.md, docs/type-parity.md,
docs/gaps.md.
2026-11-12 21:07:44 -08:00
BFlat f062dd7ed2 Merge pull request #6932 from dotCooCoo/feat/dcs-linked-spot-plates
Place: DCS files link with their spot plates as spot swatches and separate on their own inks
2026-11-13 11:27:13 +07:00
jmverges 2ac96a5ed5 Merge remote-tracking branch 'upstream/main' into fix/ai-import-font-match
# Conflicts:
#	docs/file-format-parity.md
2026-11-13 03:55:56 +00:00
BFlat e899f3fdb4 Merge pull request #6881 from dotCooCoo/feat/image-color-mask
Image Tools: Color Mask hides chosen colors of an image without changing its pixels
2026-11-13 10:27:04 +07:00
dotCooCoo f6d8af3ed6 Merge main into feat/dcs-linked-spot-plates 2026-11-12 19:09:51 -08:00
dotCooCoo 99f896f9b8 Place: DCS links follow their plate files, clips and document swatches
- The link watch and links.updateChanged look at a DCS file's plate files
  of their own, so a changed plate file is read again.
- links.update and links.relink apply the file's clipping path to the
  images in symbols, graph designs, patterns and masks too. When the new
  file has no clipping path, a clip group holding the old file's clipping
  path loses that path and stays as a plain group of the image, keeping
  its id, name, visibility and transparency. The image keeps that path with its plates to tell it from a
  clipping mask made in the document; a clipping path given another fill
  rule in the document stays. An even-odd clipping path in the file is
  kept as the same area under the nonzero rule.
- links.update and links.relink return the swatch warnings file.place
  gives, including two files that add one ink in two colors.
- links.relink with copy fails for a DCS file with plate files of its own.
- file.place answers the image id of a clipped DCS placement as image,
  and checks page and crop for a DCS file as it does for an EPS file.
- Print separations and Separations Preview take a spot plate's color
  from the document's swatch of its ink, and a reduced image's plates
  keep their coverage.
- Show DCS Transparency Interactions counts a transparent DCS image and
  characters filled or stroked with a transparent gradient.
- %%PlateFile names keep their spaces, and header bytes that are not
  UTF-8 are read as Latin-1.
- A plate program that draws more than one image, art besides its image,
  or its image through a clipping path is an error naming the plate
  instead of printing the wrong ink.
- Nested clipping paths around the composite clip the image together.
- A kept image with more plates than are read, or more TIFF directories
  than its composite and plates, is the CMYK image of its composite
  only, not a set of plates cut short.
- swatch.unused counts a spot or process swatch as used only while an
  image the art shows has a spot plate of its name.
2026-11-12 18:43:04 -08:00
jmverges e988ea6dfd Merge remote-tracking branch 'upstream/main' into fix/type-layout-envelopes
# Conflicts:
#	docs/file-format-parity.md
2026-11-13 01:58:54 +00:00
jmverges f94eecd439 Merge remote-tracking branch 'upstream/main' into fix/ai-import-font-match
# Conflicts:
#	docs/file-format-parity.md
2026-11-13 01:55:35 +00:00
dotCooCoo df155042d4 Merge main into feat/image-color-mask 2026-11-12 17:40:13 -08:00
BFlat 7430676ff0 Merge pull request #7000 from dotCooCoo/test/envelope-ink-type
Tests: envelope ink tests set type in a test face and check its outlines
2026-11-13 08:30:52 +07:00
jmvergesandClaude Opus 5.5 bb50d438c8 .ai import: type from the text document takes the face of its exact PostScript name and recorded version (#6983)
Type read from a text document's font record was set in whichever installed
face first answered to the record's PostScript name (ignoring case and
punctuation), and its family was then swapped for any available family
spelled alike but for case and punctuation (`FontDb::find_family`): a record
naming `SampleInk`, the PostScript name of `Sample/Ink`, set its type in
`SAMPLE INK`. Copies of one family and style under other PostScript names or
versions were not told apart either, so the type could set at other widths
than the file's own page.

- `named_font` / `document_font` (crates/eps/src/import/text.rs) give the
  family and style of the installed face of exactly that PostScript name,
  else one that differs only in case or punctuation, and name its version
  when the family and style alone resolve to another installed copy.
- The font record's key 5, its version string (name ID 5), is read and picks
  that version among the faces of the name. Each record is resolved once.
- `FontDb::postscript_faces` lists every installed face a PostScript name
  answers to, loading their families; the import prefers among them one of
  exactly that name.
- Type a PostScript program sets (EPS import) and legacy .ai type take the
  face of their font's name the same way.
- The .ai save writes a static font's version (`/5`) when its PostScript name
  alone would give the reader another installed copy (another version, or the
  same name in another family), keeps the version in the style it compares,
  and checks that the type comes back in the same family, style and face,
  taking the record's version as the reader does (up to 256 bytes), so such
  type round-trips without a note.

Measured on 224 users' files (used locally, never committed): 16 files set
some type in another face; 12 render differently against their own page,
10 closer and 2 further by 0.03% of the page; envelopes of type that open
live go from 154 to 159, none fewer in any file; no file opens another way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 00:33:13 +00:00
jmverges a8fc5275b6 Merge remote-tracking branch 'upstream/main' into fix/remaining-type-envelopes
# Conflicts:
#	docs/target-app-parity.md
2026-11-13 00:25:12 +00:00
dotCooCoo b1a35f8428 Tests: envelope ink tests set type in a test face and check its outlines
The three envelope ink tests set "Type" in the default family and
unwrapped ink_bounds(). Without bundled fonts, craft-fonts or system
fonts (vectorcraft-effects' tests on a bare Linux host), no face draws
and the effects test panicked at the unwrap.

Each test now adds the Heighttest Sans face built from the bundled
Source Sans 3 (test-fonts feature, now also on vectorcraft-effects'
dev-dependency), sets the text in it, and computes the expected box
from the layout's glyph outlines. It checks that envelope_ink gives
that box as well as the before and after registration boxes, so a
change to the registered measure fails the test.
2026-11-12 16:23:10 -08:00
BFlat 48d8e16444 Merge pull request #6941 from dotCooCoo/fix/ai-twist-curves
.ai import: Twist stays live on curves and groups with nothing stroked
2026-11-13 06:11:06 +07:00
jmverges 2c911f44f8 Merge remote-tracking branch 'upstream/main' into fix/remaining-type-envelopes
# Conflicts:
#	docs/target-app-parity.md
2026-11-12 22:55:36 +00:00
BFlat efaa9afb9a Merge pull request #6917 from dotCooCoo/fix/ai-look-stroke-warning
.ai save: a stroke the object's art style keeps no longer warns
2026-11-13 05:24:11 +07:00
BFlat 9861e7f927 Merge pull request #6920 from dotCooCoo/feat/export-notes-loss-first
Save and Export: notes of what the file loses come before notes on options
2026-11-13 05:23:53 +07:00
jmverges 4aef07a117 Merge remote-tracking branch 'upstream/main' into fix/type-layout-envelopes
# Conflicts:
#	crates/eps/src/import/ate.rs
#	crates/eps/src/import/tests_native.rs
#	docs/file-format-parity.md
2026-11-12 22:05:35 +00:00
jmverges 73fce692d9 Merge remote-tracking branch 'upstream/main' into fix/remaining-type-envelopes
# Conflicts:
#	docs/file-format-parity.md
2026-11-12 21:55:11 +00:00
dotCooCoo 312d4a3914 Merge main into feat/image-color-mask 2026-11-12 13:30:24 -08:00
BFlat da84e53b30 Merge pull request #6864 from jmverges/fix/6856-ai-type-pattern-paint
.ai import: type filled or stroked with a pattern keeps its pattern
2026-11-13 04:25:16 +07:00
dotCooCoo 18aed1da4e Merge main into feat/dcs-linked-spot-plates 2026-11-12 12:45:18 -08:00
dotCooCoo 15ffb4ec01 Merge main into feat/export-notes-loss-first 2026-11-12 12:45:09 -08:00
dotCooCoo b7793e839f Merge main into fix/ai-look-stroke-warning 2026-11-12 12:40:51 -08:00
BFlat bfd7b3dc00 Merge pull request #6944 from dotCooCoo/feat/bunri-kinshi
Type: Bunri-Kinshi keeps inseparable character pairs on one line
2026-11-13 03:28:08 +07:00
BFlat 653ecc8216 Merge pull request #6935 from dotCooCoo/fix/eps-linear-time-test-steps
EPS tests: the reader's long tests check counts and shared state instead of a 20 s limit
2026-11-13 03:27:59 +07:00
jmverges b783bb13ad Merge remote-tracking branch 'upstream/main' into fix/ai-type-pattern-paint
# Conflicts:
#	docs/file-format-parity.md
2026-11-12 20:19:19 +00:00
jmverges 36719e24f9 Merge remote-tracking branch 'upstream/main' into fix/type-layout-envelopes
# Conflicts:
#	docs/file-format-parity.md
2026-11-12 20:14:54 +00:00
jmverges 3ae2b6926a Merge remote-tracking branch 'upstream/main' into fix/remaining-type-envelopes
# Conflicts:
#	docs/file-format-parity.md
#	docs/target-app-parity.md
2026-11-12 20:11:07 +00:00
BFlat 41f384bffc Merge pull request #6921 from dotCooCoo/fix/ai-save-cmyk-equivalents-stable
.ai save: RGB and named colors keep their CMYK equivalents when a reopened file is saved
2026-11-13 02:47:37 +07:00
BFlat 86f8a6dcbd Merge pull request #6927 from dotCooCoo/fix/roughen-size-zero
Effects: Roughen at size 0 keeps the outline
2026-11-13 02:46:39 +07:00
BFlat d22d3ced48 Merge pull request #6931 from dotCooCoo/fix/eps-cshow-kshow-restore-font
EPS import: cshow and kshow procedures see the font PLRM gives them
2026-11-13 02:46:10 +07:00
BFlat e263a9c7d6 Merge pull request #6895 from makesomethingshit/fix/6865-ai-oversized-artboard
Fix #6865: Keep oversized artboards when opening editing data
2026-11-13 02:45:43 +07:00
dotCooCoo 40f4c920e7 Type: Bunri-Kinshi keeps inseparable character pairs on one line
Paragraph panel menu > Bunri-Kinshi (with the East Asian options) and
text.setFormat {bunriKinshi} turn it on per paragraph. A line then
never breaks inside two em dashes, two horizontal ellipses, two two-dot
leaders or the two halves of a vertical kana repeat mark, the pairs W3C
JLREQ lists for class cl-08 (https://www.w3.org/TR/jlreq/#cl-08), nor
inside a chain of em dashes. Both composers, vertical type, Kinsoku
Shori Type, hyphenation and No Break follow it, and a pair wider than
the line stays whole on it. Justification and letter spacing add no
space inside a pair.

The setting works only with a Kinsoku Set: with Kinsoku Set None the
paragraph keeps the value without effect and the menu item is
unavailable. It is off by default, saved with the paragraph only when
on, carried by paragraph styles (Paragraph Style Options > East Asian
Composition Settings), and turned off by Reset Panel. A value that is
not true or false is refused. The .ai editing data has no field for it,
so saving reports a paragraph with it on and a pair in it as left out.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-12 10:26:11 -08:00
dotCooCoo 5f5058f425 .ai import: Twist stays live on curves and groups with nothing stroked
Twist was read as a live effect only on an unstroked path or compound
path whose segments were all straight, and on those at any angle.

- A curved path or compound path, or a group, with nothing stroked and
  no guide in it now opens with its Twist live when the twist is at
  most 90° either way. Larger twists on these keep the file's drawn
  look. The 90° limit is VectorCraft's own.
- Paths and compound paths with straight segments and nothing stroked
  keep their Twist live at any angle, as before, guides included.
- Stroked objects keep the drawn look, as before.
- .ai save keeps a link to a Twist graphic style on the objects the
  reader reads it on, and leaves it out, with the style-link warning,
  on the others.

Docs: docs/file-format-parity.md, docs/target-app-parity.md.
2026-11-12 10:22:29 -08:00
jmverges d23972104b Merge remote-tracking branch 'upstream/main' into fix/ai-type-pattern-paint
# Conflicts:
#	docs/file-format-parity.md
2026-11-12 18:02:58 +00:00
jmverges e2827d20c1 Merge remote-tracking branch 'upstream/main' into fix/remaining-type-envelopes
# Conflicts:
#	docs/file-format-parity.md
#	docs/target-app-parity.md
2026-11-12 18:02:53 +00:00
BFlat 77d8113073 Merge pull request #6924 from dotCooCoo/fix/followup-5139
.ai import: cite the sources of the Distort & Transform effect keys
2026-11-13 00:49:28 +07:00
dotCooCoo 812cf5f4cd .ai save: RGB values are written in the working RGB space
Plain RGB fills and strokes and RGB gradient stops were written with
their display RGB values. The reader reads those values as working RGB,
so with a working RGB space other than sRGB a reopened file was saved
with different RGB values and CMYK equivalents. They are now written
with the color's own RGB values, as global process and spot colors
already were.

A spot color in a gradient stop now writes its RGB values from its full
color as the palette writes it (Lab to four decimals and clamped), the
same values its CMYK equivalent comes from.
2026-11-12 09:40:31 -08:00
dotCooCoo 6213d1c471 EPS tests: the reader's long tests check counts and shared state instead of a 20 s limit
many_tiling_patterns_and_spot_inks_read_in_linear_time checked that a
program setting 200,000 different tiling patterns and 200,001 spot inks
reads within 20 s of wall-clock time. It reads in about 4 s alone; while
the crate's full test suite ran in parallel it took more than 20 s and
failed.

In test builds, the tiling pattern lookup now counts on its thread how
many patterns it compared with the one it looked for (tilings_compared,
gated with cfg(test) like SELECTOR_TESTS in the SVG reader's CSS). The
test, renamed many_tiling_patterns_are_found_again_through_a_hash, reads
through import on a thread of its own and asserts that its 200,000
lookups compared at most 200,000 patterns in all. When every pattern
hashes alike, as when each lookup went through every pattern made so
far, the lookups compare 19,999,900,000 and the test fails. The test
still reads the 200,001 spot inks and checks their swatches, but it does
not count or time their lookups.

The other tests that read through read_soon wait 300 s instead of 20 s,
as a guard against a read that never ends; their budgets and limits
decide what they check. work_on_the_longest_dash_pattern_ends_soon (4.5 s
alone) now also checks that the states gsave, grestore, gstate,
currentgstate and setgstate save, make or set hold the one 65,535-entry
dash pattern, so a copy of the pattern in any of them fails it.
2026-11-12 09:38:05 -08:00
dotCooCoo 1fd194d21d Merge main into fix/ai-look-stroke-warning 2026-11-12 09:30:21 -08:00
dotCooCoo 7dd161cc49 Place: DCS files link with their spot plates as spot swatches and separate on their own inks
File › Place with Link reads a DCS 1.0 or 2.0 file (an EPS file whose
header names one EPS program per printing plate) as one linked image of
its plates. Each spot plate adds a spot swatch in the CMYK values the
file gives, and the clipping path the file's composite is drawn through
clips the image. document.open, file.place without link or from bytes,
and links.embed refuse a DCS file and change nothing.

- The screen, composite print and exports show the plates mixed into
  CMYK. Separations Preview and print separations show each plate on
  its own ink; a spot plate prints as its CMYK values when spots print
  as process.
- links.list answers the format DCS, and with dcsTransparency marks the
  DCS images that are transparent or overlap transparent objects (the
  Links panel menu's Show DCS Transparency Interactions).
- swatch.unused leaves out a spot swatch while a DCS image has a plate
  of its ink.
- links.update and links.relink read the plates and the clipping path
  again, and the link shows as modified when one of its plate files
  changes or is gone.
- The plates go on the first plate's pixel grid, grown to hold every
  plate where it prints; a plate of another size or position is
  resampled onto it.
- A file may name 64 plates, a plate file may be 1 GB, and the plates
  together may hold 512 MB of ink amounts. A file naming more plates is
  an error.

Docs: docs/mcp.md, docs/target-app-parity.md, docs/file-format-parity.md.
2026-11-12 09:30:20 -08:00
dotCooCoo 3e46408ab5 EPS import: cshow and kshow procedures see the font PLRM gives them
In a CID-keyed font whose CIDFont the file only names, a cshow procedure
now runs with the CIDFont as the current font, rootfont gives the
composite font, and the procedure gets each code's last byte. A show in
the CIDFont shows the character of that code, and any other string is a
rangecheck error. The current font is restored after each procedure.

A kshow procedure no longer leaves a font it sets current: the current
font is restored when the procedure completes, for every font, and a
kshow the procedure runs sees the font the procedure set.

In GBT-H and CNS2-H, whose mappings are not read, a byte that starts no
row-and-cell code is a code of its own.

docs/gaps.md dates this G9 work in a bullet of its own.
2026-11-12 09:25:14 -08:00
makesomethingshit 777fb2fa42 Merge upstream/main into fix/6865-ai-oversized-artboard 2026-11-13 02:19:20 +09:00
jmverges ad2df449ea Merge remote-tracking branch 'upstream/main' into fix/type-layout-envelopes
# Conflicts:
#	docs/file-format-parity.md
2026-11-12 17:07:51 +00:00
dotCooCoo 8d27e53115 Merge main into feat/image-color-mask 2026-11-12 08:56:33 -08:00
dotCooCoo 91e1412d77 Effects: Roughen at size 0 keeps the outline
With Size 0, Roughen moved no point but still replaced each segment
with its Detail's points joined by straight lines (Corner) or by a
smoothed curve through them (Smooth), so a curved path lost its shape.

At Size 0 each segment is now split at the Detail spacing into pieces
of equal length on the segment itself, with `pathtools::insert_at`: a
straight segment gets corner points without handles, and a curve gets
smooth points whose handles follow it. The path keeps its outline with
Smooth or Corner points alike. The params text of `distort.roughen`
describes size 0.

`insert_at` now counts the anchors added before each returned mark in
one pass. It counted them again for every split segment, which took
quadratic time on a path with many split segments. Its results are
unchanged.

Existing documents with a Roughen of Size 0 on a curved path, or with
Smooth points, draw differently.

This is VectorCraft's own rule. What Roughen does is described in
https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/distort-and-transform-effects-in-illustrator.html
2026-11-12 08:55:07 -08:00
BFlat a6aac579c0 Merge pull request #6904 from dotCooCoo/feat/ai-editing-data-s6c
.ai save: the editing copy keeps brushes and brushed paths
2026-11-12 23:53:38 +07:00