Add the kurbo 0.13.1 package to vendor/ with no file changed, so that a
fix to it can reach the Craft apps through this repository. The package
was published from the v0.13.1 tag of linebender/kurbo, and every file
of the archive is kept.
Add a workspace exclude, a [patch.crates-io] entry, SOURCE.json with the
archive hash and per-file hashes, a NOTICE section, and the package's
tests in the backend test script, whose other backends now also build
against the copy. Every workspace crate that uses kurbo 0.13 builds
against the copy, so Cargo.lock drops the package's registry source and
checksum.
`position_after_edits` checks the position of every segment on the sweep
line, and of each contour continuation's old segment, after each edit.
`scripts/test-pdf-backends.sh` runs the unit and regression tests a second
time with the `slow-asserts` feature.
README.craft.md and SOURCE.json describe each local change from the merged
pull requests. NOTICE keeps one sentence, and the sha256 of every patched file
is the committed blob's hash.
Keep the fast approximation path off almost-horizontal pieces, give the
winding-storage allocation test its allowance, and run only the paperjs trials
that need no data files.
checkerboard and slanted_checkerboard counted the inner squares as n - 1, which overflowed for n = 0. They now use n.saturating_sub(1). test-pdf-backends.sh runs the generators tests with the feature on.
`pixmap_distance` in `tests/paperjs.rs` compared only red, green and
blue. The test fills both shapes with opaque black on a transparent
pixmap, so a covered pixel and an empty one have the same color and the
distance was 0 for any result. The distance now also counts the alpha
difference, and `pixmap_distance_counts_coverage` checks that a filled
pixmap and an empty one are at distance 1.
`scripts/test-pdf-backends.sh` and `README.craft.md` run the `paperjs`
test as well. The package does not include the `boolean-test/data/`
files the test reads, so here it runs only the new test.
The change is recorded in `SOURCE.json`, the Local changes table in
`README.craft.md` and `NOTICE`.
The example's curves span x = -1 to 1 and each row is translated only in
y, but the viewBox started at x = 0, so the left half of every curve was
cut off. The viewBox now starts at x = -1.5. A test in the example checks
that every curve fits in the viewBox, and scripts/test-pdf-backends.sh
runs it. README.craft.md and SOURCE.json record the change.
The package's Cargo.toml registers the fonts and snapshots tests, the
boolean_op and winding-numbers examples and the linebender_logo bench.
They import linesweeper_util, path_bool or kompari, which the published
manifest leaves out, and the bench also reads examples/linebender.svg,
which the copy omits. `cargo check --all-targets --all-features` in
vendor/linesweeper failed with E0432 and a missing-file error.
The copy's Cargo.toml no longer registers those five targets; their
source files are unchanged. scripts/test-pdf-backends.sh now runs
`cargo check --locked --all-targets --all-features` on the copy.
README.craft.md, SOURCE.json and NOTICE record the change.
The boolean_op, visualize_op and winding-numbers examples set the SVG
stroke width to (max_y - min_y).max(max_x - max_y) / 512, which uses
max_x - max_y for the width. A bounding box from (0, 1000) to
(512, 1001) got a stroke width of 1/512 instead of 1. The width is now
max_x - min_x.
visualize_op computes the width in a stroke_width function with a test,
and scripts/test-pdf-backends.sh runs that example's test. The other two
examples do not compile in this copy. README.craft.md and SOURCE.json
record the change.
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.
hayro-postscript 0.1.0 is the token scanner hayro-cmap uses for the
CMap streams PDFs embed. Its object reader skipped each `<<` or `>>`
by calling itself again, so a stream holding a long run of `<` or `>`
bytes recursed once per pair and aborted the process with a stack
overflow.
Vendor the crates.io package unchanged and patch `object::read` to
skip those runs in a loop, returning the same next object as before.
Wire it in like the other Hayro crates: workspace exclude,
[patch.crates-io] entry, SOURCE.json with registry and local hashes,
the backend test script, NOTICE, ATTRIBUTION.md and the reader README.
Tests cover a million `<` and a million `>` bytes, `<< /A 1 >>` and
nested `<<<< /X >>>>` runs.
* pdf: keep a CID font's /W2 table past an out-of-range first CID; vendor hayro-cmap from PdfCraft
- hayro-interpret: a /W2 run whose first CID is past 65535 is skipped, as in
/W. A run starting at 4294967295 overflowed the CID counter and discarded
the whole table. Unit test in font::cid.
- hayro-cmap 0.1.0 is vendored from PdfCraft a2ec27b47 with its malformed-CMap
patch (PdfCraft #3177): bad bfchar/bfrange entries, an unresolvable usecmap
and an unparseable tail are skipped instead of failing the whole CMap. The
crate's tests come with it. Wired up like the other vendored Hayro crates
(workspace exclude, patch entry, SOURCE.json, backend test script); NOTICE,
ATTRIBUTION.md and vendor/README.craft-reader.md record the source.
* hayro-syntax: refuse an xref-stream subsection that runs past object number u32::MAX
The object number was start + i in unchecked u32: a subsection starting near
u32::MAX overflowed (a panic in debug builds, a wrong object number in
release). Covered in xref::tests::xref_stream_entries_need_backing_bytes.
* hayro-cmap: a binary usecmap counts against the nesting limit; /W2 checks the CID first
- hayro-cmap: a binary CMap's usecmap passed its own depth to the nested
parse, so a self-referencing binary CMap recursed until the stack
overflowed. It now counts like a text usecmap. Test:
self_referencing_binary_usecmap_stops_at_the_nesting_limit.
- hayro-interpret: the /W2 first-CID check runs before the run's metrics
are read, so an incomplete run past CID 65535 no longer discards the
rest of the table.
* hayro-syntax: refuse xref-stream object numbers past i32::MAX
ObjectIdentifier stores an i32; a number between i32::MAX and u32::MAX
was cast to a negative object number.