mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
PDF: shared reader from craft-libs 9f75d3dc (input bounds and crash fixes) (#1701)
* PDF: craft-pdf, krilla and hayro from craft-libs main (input bounds and crash fixes) * PDF: craft-libs 9f75d3dc, with hayro-cmap from its vendored copy
This commit is contained in:
Generated
+7
-8
@@ -841,7 +841,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=82a24b006eefa036b43c09
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "craft-pdf"
|
name = "craft-pdf"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"hayro",
|
"hayro",
|
||||||
@@ -2123,7 +2123,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "hayro"
|
name = "hayro"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"hayro-interpret",
|
"hayro-interpret",
|
||||||
@@ -2143,8 +2143,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "hayro-cmap"
|
name = "hayro-cmap"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
checksum = "24d285dc30731c8485de5fa732fbdf2b3affdf01e4da7c2135022ca6fa664bf6"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"brotli",
|
"brotli",
|
||||||
"hayro-postscript",
|
"hayro-postscript",
|
||||||
@@ -2153,7 +2152,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "hayro-interpret"
|
name = "hayro-interpret"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.13.2",
|
"bitflags 2.13.2",
|
||||||
"hayro-cmap",
|
"hayro-cmap",
|
||||||
@@ -2171,7 +2170,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "hayro-jbig2"
|
name = "hayro-jbig2"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fearless_simd",
|
"fearless_simd",
|
||||||
"hayro-ccitt",
|
"hayro-ccitt",
|
||||||
@@ -2195,7 +2194,7 @@ checksum = "885c5ef0654933139a9b9546fc2c69e18d37f38aa2520f079092b1be18f1fcaa"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "hayro-syntax"
|
name = "hayro-syntax"
|
||||||
version = "0.7.2"
|
version = "0.7.2"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"flate2",
|
"flate2",
|
||||||
"hayro-ccitt",
|
"hayro-ccitt",
|
||||||
@@ -2559,7 +2558,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "krilla"
|
name = "krilla"
|
||||||
version = "0.8.2"
|
version = "0.8.2"
|
||||||
source = "git+https://github.com/storytold/craft-libs?rev=89dcbb3060377a26c99a6d80caa16084366704c4#89dcbb3060377a26c99a6d80caa16084366704c4"
|
source = "git+https://github.com/storytold/craft-libs?rev=9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef#9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
|
|||||||
+7
-6
@@ -12,7 +12,7 @@ repository = "https://github.com/storytold/designcraft"
|
|||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
# Shared reader and writer; publish the immutable revision before this consumer.
|
# Shared reader and writer; publish the immutable revision before this consumer.
|
||||||
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.1.0", default-features = false }
|
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.1.0", default-features = false }
|
||||||
# internal
|
# internal
|
||||||
designcraft-geom = { path = "crates/geom" }
|
designcraft-geom = { path = "crates/geom" }
|
||||||
designcraft-color = { path = "crates/color" }
|
designcraft-color = { path = "crates/color" }
|
||||||
@@ -122,9 +122,10 @@ debug = 0
|
|||||||
|
|
||||||
# Opt-in cancelable macOS termination on the pinned winit 0.30 line.
|
# Opt-in cancelable macOS termination on the pinned winit 0.30 line.
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
krilla = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.8.2" }
|
krilla = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.8.2" }
|
||||||
winit = { git = "https://github.com/storytold/winit.git", rev = "3d51077fd1a966f84df9ef287839dc84fd5b4ca7" }
|
winit = { git = "https://github.com/storytold/winit.git", rev = "3d51077fd1a966f84df9ef287839dc84fd5b4ca7" }
|
||||||
hayro = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.7.1" }
|
hayro = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.7.1" }
|
||||||
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.7.0" }
|
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.7.0" }
|
||||||
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.7.2" }
|
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.7.2" }
|
||||||
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "89dcbb3060377a26c99a6d80caa16084366704c4", version = "=0.3.0" }
|
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.3.0" }
|
||||||
|
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef", version = "=0.1.0" }
|
||||||
|
|||||||
@@ -92,14 +92,15 @@ No Adobe icons, images or artwork are included.
|
|||||||
|
|
||||||
PDF backend source
|
PDF backend source
|
||||||
|
|
||||||
The patched hayro 0.7.1, hayro-interpret 0.7.0, hayro-syntax 0.7.2 and hayro-jbig2 0.3.0
|
The patched hayro 0.7.1, hayro-interpret 0.7.0, hayro-syntax 0.7.2, hayro-jbig2 0.3.0 and
|
||||||
are fetched from https://github.com/storytold/craft-libs at revision
|
hayro-cmap 0.1.0 are fetched from https://github.com/storytold/craft-libs at revision
|
||||||
89dcbb3060377a26c99a6d80caa16084366704c4. The four source snapshots were transferred
|
9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef. The first four source snapshots were transferred
|
||||||
from https://github.com/storytold/pdfcraft at revision
|
from https://github.com/storytold/pdfcraft at revision
|
||||||
7437bde378f43856eada40af25b983812e615e8a, then patched in craft-libs. Their upstream project is
|
7437bde378f43856eada40af25b983812e615e8a and hayro-cmap at revision
|
||||||
|
a2ec27b4775f53c40cad3456936d9406611e3a8d, then patched in craft-libs. Their upstream project is
|
||||||
https://github.com/LaurenzV/hayro, licensed MIT OR Apache-2.0. The snapshot retains each
|
https://github.com/LaurenzV/hayro, licensed MIT OR Apache-2.0. The snapshot retains each
|
||||||
crate's upstream licence files. The patch ledger is at
|
crate's upstream licence files. The patch ledger is at
|
||||||
https://github.com/storytold/craft-libs/blob/89dcbb3060377a26c99a6d80caa16084366704c4/vendor/README.craft-reader.md.
|
https://github.com/storytold/craft-libs/blob/9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef/vendor/README.craft-reader.md.
|
||||||
Per-crate vendor/SOURCE.json files record transferred and local source hashes; asset
|
Per-crate vendor/SOURCE.json files record transferred and local source hashes; asset
|
||||||
origins and unchanged per-file hashes are recorded separately in ASSETS.md.
|
origins and unchanged per-file hashes are recorded separately in ASSETS.md.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
# Shared PDF backend
|
# Shared PDF backend
|
||||||
|
|
||||||
DesignCraft pins `craft-pdf`, patched Krilla 0.8.2 and the four Hayro reader crates to
|
DesignCraft pins `craft-pdf`, patched Krilla 0.8.2 and the five Hayro reader crates (with
|
||||||
craft-libs revision `89dcbb3060377a26c99a6d80caa16084366704c4`. Existing `craft-ui` and `craft-print` revisions
|
`hayro-cmap`) to craft-libs revision `9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef`. Existing `craft-ui` and `craft-print` revisions
|
||||||
remain unchanged. The reader migration is reviewed on top of the separate writer change.
|
remain unchanged. The reader migration is reviewed on top of the separate writer change.
|
||||||
|
|
||||||
## Writing
|
## Writing
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use std::process::Command;
|
|||||||
|
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
const REV: &str = "89dcbb3060377a26c99a6d80caa16084366704c4";
|
const REV: &str = "9f75d3dc19b4b514c4f3d4847ed1ec1b0e86b4ef";
|
||||||
const PACKAGES: &[(&str, &str)] = &[
|
const PACKAGES: &[(&str, &str)] = &[
|
||||||
("craft-pdf", "0.1.0"),
|
("craft-pdf", "0.1.0"),
|
||||||
("krilla", "0.8.2"),
|
("krilla", "0.8.2"),
|
||||||
@@ -12,6 +12,7 @@ const PACKAGES: &[(&str, &str)] = &[
|
|||||||
("hayro-interpret", "0.7.0"),
|
("hayro-interpret", "0.7.0"),
|
||||||
("hayro-syntax", "0.7.2"),
|
("hayro-syntax", "0.7.2"),
|
||||||
("hayro-jbig2", "0.3.0"),
|
("hayro-jbig2", "0.3.0"),
|
||||||
|
("hayro-cmap", "0.1.0"),
|
||||||
];
|
];
|
||||||
|
|
||||||
pub fn run(root: &Path) -> Result<(), String> {
|
pub fn run(root: &Path) -> Result<(), String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user