diff --git a/Cargo.lock b/Cargo.lock index 4fc09a2805..cae84c150c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1579,7 +1579,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "aes", "bytemuck", @@ -1695,7 +1695,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "fax", "hayro-ccitt", @@ -3319,7 +3319,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "bytemuck", "hayro-interpret", @@ -3339,7 +3339,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "brotli", "hayro-postscript", @@ -3348,7 +3348,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3366,7 +3366,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3389,7 +3389,7 @@ source = "git+https://github.com/storytold/craft-libs?rev=e7873217287876f76a0455 [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=a6e9a7e6c596982f3aaee1abf9a391383fb0a99e#a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" +source = "git+https://github.com/storytold/craft-libs?rev=9eb02be84f21898e247daeb2af5827c9fe85a3a0#9eb02be84f21898e247daeb2af5827c9fe85a3a0" dependencies = [ "flate2", "hayro-ccitt", diff --git a/Cargo.toml b/Cargo.toml index f02a313b0b..5325f0261e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ craft-zip = { git = "https://github.com/storytold/craft-libs", version = "0.1.0" craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "e2dc681a3" } # craft-update: app-specific pretend versions apply to startup and manual checks. craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "e2dc681a3", features = ["egui"] } -craft-pdf = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e", features = ["cos", "crypt", "filters", "fonts"] } +craft-pdf = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0", features = ["cos", "crypt", "filters", "fonts"] } # The writers the Word and RTF exports map onto (storytold/craft-libs#793). craft-rtf, craft-wordmodel and # craft-docx move together: craft_rtf::doc::export takes its own revision's Document. craft-rtf = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "b8eaa8e2f3561f9fa27fcf3b7f67ce915e93caa3" } @@ -166,12 +166,12 @@ codegen-units = 1 # Vendored, patched third-party crates (see vendor/README.md). Each patch is meant to go upstream. [patch.crates-io] -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" } -hayro = { git = "https://github.com/storytold/craft-libs", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" } -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0" } +hayro = { git = "https://github.com/storytold/craft-libs", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0" } hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "e7873217287876f76a045550369c90a541693c33" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "9eb02be84f21898e247daeb2af5827c9fe85a3a0" } lopdf = { path = "vendor/lopdf" } vello_common = { path = "vendor/vello_common" } vello_cpu = { path = "vendor/vello_cpu" } diff --git a/crates/render/src/raster.rs b/crates/render/src/raster.rs index 8dd27b5d52..814801dd92 100644 --- a/crates/render/src/raster.rs +++ b/crates/render/src/raster.rs @@ -440,7 +440,14 @@ fn render_page<'a>( Some(t) => { let scale = req.scale.clamp(0.01, 400.0); let (tw, th) = (t.w.clamp(1, 4096), t.h.clamp(1, 4096)); - RasterOptions { scale: [scale, scale], size: Some([tw, th]), offset: [t.x as f32, t.y as f32], background, color_replacement } + RasterOptions { + scale: [scale, scale], + size: Some([tw, th]), + offset: [t.x as f32, t.y as f32], + background, + color_replacement, + ..Default::default() + } } None => { let scale = effective_scale(w, h, req.scale); @@ -457,7 +464,14 @@ fn render_page<'a>( // hayro floors the size when none is given, losing the partial edge pixels. The // scale keeps each side within MAX_SIDE (give or take float noise), so it fits u32. let side = |pt: f32| device_pixels(pt, scale).min(MAX_SIDE as u32); - RasterOptions { scale: [scale, scale], size: Some([side(w), side(h)]), offset: [0.0, 0.0], background, color_replacement } + RasterOptions { + scale: [scale, scale], + size: Some([side(w), side(h)]), + offset: [0.0, 0.0], + background, + color_replacement, + ..Default::default() + } } }; // Rendered straight into a buffer of whole pixels, which the GUI takes over as is. diff --git a/crates/render/src/raster/tests/coverage_budget.rs b/crates/render/src/raster/tests/coverage_budget.rs index 491d49255d..00aa2d6b50 100644 --- a/crates/render/src/raster/tests/coverage_budget.rs +++ b/crates/render/src/raster/tests/coverage_budget.rs @@ -70,7 +70,6 @@ fn render_kept_to(pdf: Vec, max_coverage: Option) -> (Vec, bool) } #[test] -#[ignore = "craft-libs uses unvendored vello_cpu 0.0.8 where RenderSettings::max_coverage is a no-op"] fn a_page_past_its_coverage_leaves_the_rest_out_and_says_so() { // 2^10 circles, each storing its edge tiles' coverage. let pdf = doubling_forms(10); @@ -107,7 +106,6 @@ fn leaves_out_past_the_limit(leaf: &str, marker: &str) { } #[test] -#[ignore = "craft-libs uses unvendored vello_cpu 0.0.8 where RenderSettings::max_coverage is a no-op"] fn strokes_past_the_coverage_are_left_out() { // A stroked circle and a stroked curve: neither is a rectangle, so both go through // `stroke_path`, and the page's only coverage is strokes. @@ -118,7 +116,6 @@ fn strokes_past_the_coverage_are_left_out() { } #[test] -#[ignore = "craft-libs uses unvendored vello_cpu 0.0.8 where RenderSettings::max_coverage is a no-op"] fn fast_rectangles_past_the_coverage_are_left_out() { // Axis-aligned rectangles fill through `fill_rect_fast`, and are the page's only coverage. leaves_out_past_the_limit("0 0 1 rg 40.5 40.5 119 119 re f", "1 0 0 rg 170.5 10.5 20 20 re f"); diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 16d1f6d8c3..ccc189c2f6 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -6,7 +6,7 @@ use std::process::Command; use serde_json::Value; -const SHARED_REV: &str = "a6e9a7e6c596982f3aaee1abf9a391383fb0a99e"; +const SHARED_REV: &str = "9eb02be84f21898e247daeb2af5827c9fe85a3a0"; const PACKAGES: &[(&str, &str)] = &[ ("craft-pdf", "0.1.0"), ("hayro", "0.7.1"),