* hayro*: port pdfcraft vendor/hayro* patches (storytold/craft-libs#778)
* hayro-syntax: fix test and merge compile errors from port
* fix(hayro-syntax): avoid moving params.control in lzw_flate test
* fix(hayro-syntax): include early_change in lzw_flate test
* hayro*: fix hayro-interpret compile errors and hayro-syntax test failures
* hayro*: fix duplicate char_code_to_unicode and super::LETTER in test
* hayro-syntax: fix predictor cancellation and ArrayIter parse failure tests
* hayro-syntax: restore bit-level PNG predictor fallback when control is set
* hayro-syntax: support Checkpoints cancellation inside unfilter_png
* hayro-interpret: remove duplicate blob::tests and require hayro-syntax 0.7.2
* hayro-interpret: cast MAX_COLOR_SPACE_DEPTH u32 as usize in test
* hayro: drop unvendored vello_cpu set_max_coverage/coverage_full calls
* hayro-interpret: restore interpret_form_contents call and TextPass order
* hayro-interpret: split ExtendedWarning out of InterpreterWarning for vectorcraft compatibility
* hayro-interpret: clone extended_warning_sink before ImageXObject::new closure
* hayro-interpret: restore OP/op/OPM ExtGState handling for overprint
* hayro-interpret: restore DecodeLimits and truncation reporting in decode_content
* hayro: restore on_plate DefaultColorSpaces bypass and cmyk_luminosity soft mask
Merges main at d7c9632bfb.
- Cargo.toml: both sides' new workspace crates (next's font-subset, harfbuzz-subset-sys and
host; main's gpu, gpu-null, gpu-providers and gpu-wgpu).
- crates/jpeg: next split lib.rs into modules; main's reduced-size decoding goes to them: the
scaled IDCT, reconstruction and render_scaled to idct.rs, MAX_SHRINK, reduced_estimate and
decode_reduced stay public in lib.rs. Main's new test added; the frame test next removed
stays removed.
- crates/audio, crates/media: next builds the integration tests into the library's test
executable (autotests off, tests/main.rs); main's new DSD and MPEG-TS mux tests are modules
there behind their features instead of [[test]] targets, and the mux tests reach their shared
helper module through the integration module.
- crates/media/src/matroska/track.rs: main's new FFV1 codec-parameter test added; the test
modules next removed stay removed.
- crates/file-formats: main's JXL capability test, which asks the codec whether JXL reads,
replaces next's interim check.
A literal string's octal escape was converted with `u8::from_str_radix`,
which fails above 0o377, so the byte was dropped. Read one to three octal
digits into a u16 (at most 0o777) and push the low byte, as ISO 32000-2
7.3.4.2 and the PostScript Language Reference (third edition, 3.2.2)
specify: "high-order overflow shall be ignored". Escapes up to `\377`
decode as before.
Record the patch in SOURCE.json and vendor/README.craft-reader.md.
Fixes#2321
storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.
- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
961 upstream commits since 7bb6c900. Resolutions:
- Test-only conflicts: upstream tests from before the base that our side
cut stay cut; tests new upstream are kept (audio aac/config, layout,
encode_format; cms lutfile; media mux; print windows_native, ticket;
update self_update; xml hostile).
- Code our side moved, with upstream's change carried to the new place:
craft-media mux roll sample groups (mux/boxes.rs) and writer-start
offsets with overflow checks (mux/progressive.rs); craft-print's
shrink-to-fit scale guard (sheets/plan.rs); craft-update's nextest
archive detection (self_update/detect.rs); craft-vectorcraft-format's
Tail::write_to_with (container.rs); craft-i18n's pedantic fixes
(bidi.rs, negotiation.rs).
- craft-ui: the old crate's modules stay removed; gpu_test_lock guarded
their per-test wgpu renderers, which the snapshot kit does not have.
- New upstream tests in crates that build their integration tests into
the library's test executable are modules of tests/main.rs (audio
flac_decode and qoa_oracle, cms, docpath, pcraft-format,
vectorcraft-format).
- The 22 new crates are optional members of the craft facade.
* PDF interpret: a glyph shown in a clipping mode clips even with no outline
A glyph shown in a clipping render mode (`4 Tr` to `7 Tr`) adds its outline to
the clipping path, and that clip applies to everything painted after `ET` until
the enclosing `Q`. When the glyphs shown have no outline -- a space, say -- the
clip they contribute is empty, and an empty clip admits nothing.
`interpret_window` applied a clip only once a glyph had contributed an outline,
so such a text object applied *no* clip and what followed painted unmasked.
A text object that shows no glyph at all is a different case and is left alone:
the clipping path is unchanged there, as readers leave it, and a glyph whose
outline is unavailable (Type 3) leaves the real clip unknown, so both stay
unclipped. pdf.js draws the same line in `endText`: it builds the clip from the
glyphs shown, empty outlines and all, and applies none when none were shown.
Measured on a page filled red behind the text object, Preview (CoreGraphics)
and Firefox (pdf.js) agreeing on the case this changes:
a space shown in 7 Tr before: the fill paints after: nothing paints
no glyph shown in 7 Tr unchanged: the fill paints
Companion to storytold/pdfcraft#3451.
The first push of this branch also carried 803 build-artifact files from
`crates/pdf/read-only-contract/target/`, which `.gitignore` did not cover: its
`/target` is anchored to the repository root, so a sub-crate's own build
directory is not ignored. Recommitted without them, and `target/` added so the
next one cannot slip in either (#185 review).
* pdf: test visible glyphs in a clipping mode, and what each clip leaves on the page
---------
Co-authored-by: Hamza <mail.hamzanaveed@gmail.com>
* krilla: TrueType subsets keep the font's OS/2 table (embedding permissions)
The subsetter writes only the tables it subsets, so a FontFile2 program
had no OS/2 table and the font's embedding permissions (OS/2.fsType)
never reached the PDF: a Preview & Print or Restricted font looked
unrestricted to anything reading the file later (designcraft#1781).
Patch 18 adds the source font's OS/2 table, byte for byte, to a
TrueType subset that lacks one, rewriting the table directory with its
checksums and head.checkSumAdjustment. CFF programs are still embedded
bare. Ledger, patch file and SOURCE.json updated; craft-pdf's new
font_tables test checks the table, its fsType and the font's checksums.
* krilla: the OS/2 test checks the embedded program is a subset
Its sfnt and re-read checks also pass for the source font embedded whole. A subset has fewer glyphs than the fixture's 11, and a shorter glyf.
---------
Co-authored-by: Hamza <mail.hamzanaveed@gmail.com>
A segment that exits at a sweep line keeps its position until the sweep advances, and segment_range leaves it out.
---------
Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
The lemma for the intersection scan to the left asked for the ordering
invariant on (alpha^1, ..., alpha^i) and the crossing invariant on
(alpha^1, ..., alpha^(i+1)). The bidirectional lemma applies it with
alpha^(i+1) = beta before the extended list is known to satisfy the
crossing invariant, so the premises now mirror the right scan: ordering
on (alpha^1, ..., alpha^(i+1)), crossing on (alpha^1, ..., alpha^i).
The argument that the order invariant holds between events cited a
"third invariant"; the document defines two, and it now cites the
crossing invariant.
SOURCE.json gets a local_patches entry and the new sha256 of
docs/sweep.typ, and README.craft.md lists the change.
* hayro-jbig2: bound a stream's total decode work and what a page retains; no i32 overflow
Port of pdfcraft 85c10051 (patches 5-9), 82439525 (patch 10) and 10107d94 (patch 12).
* hayro-jbig2: PdfCraft's JBIG2 follow-ups (refinement fixes, file header, work accounting, dictionary pixel cap)
Ports pdfcraft 72e763ad, b7ec3669, e3bc4e85, 01d3479f, b9e068aa, 858ce960, 07f44038, e38b9d18, 8717a085, 58c30af3 and the hayro-jbig2 part of e2464e14 (with the hayro-jbig2 part of 0ed33990 they build on).
* vendor/README.craft-reader.md: one #831 paragraph, the follow-ups after it
* pdf inspection: count pending text clips and drop page content after reading
- hayro-interpret: state_bytes counts the pending text-clip outlines a
saved state copies, so MAX_SAVED_STATE_BYTES bounds them too.
- plate-test structure: read each page through a ContentReader into a
buffer dropped after the page, instead of page.operations(), which keeps
every page's decoded content for as long as the document.
* address review: cap page content read at the 256 MiB decode limit
* fix the saved-state test: start the clip outline with a MoveTo
Two typos in docs/sweep.typ are corrected: "condi0.2tions" reads
"conditions", and the insertion-position argument says q(i+1) is false
instead of q(i+i).
SOURCE.json records the new sha256 of docs/sweep.typ and the change in
local_patches, and README.craft.md lists it.
The pseudocode for the intersection scan to the left looped j = i down
to 1 and compared each alpha^j with alpha^i, so its first pass compared
alpha^i with itself. The lemma after it is stated for alpha^(i+1), the
segment being inserted to the right of alpha^i. The loop body now uses
alpha^(i+1), and w^j is the smallest event height between j and i+1.
SOURCE.json records the patch in local_patches and the new sha256 of
docs/sweep.typ. README.craft.md and NOTICE say one file is changed.
Add the linesweeper 0.5.0 package to vendor/ with no file changed, so
that a fix to it can reach the Craft apps through this repository
without waiting for a linesweeper release. The GitHub repository its
manifest names is archived, and its README says development moved off
GitHub.
Leave out the test font (fonts live in craft-fonts), the logo artwork,
the snapshot images and the package's repository tooling. SOURCE.json
lists each with its hash.
Add a workspace exclude, a [patch.crates-io] entry, SOURCE.json with
the archive hash and per-file hashes, NOTICE and ATTRIBUTION.md rows,
and the package's tests in the backend test script. craft-prepress's
flatten feature now builds against the copy, so Cargo.lock drops the
package's registry source and checksum.