mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 10:39:01 -06:00
* test: give faux-redaction audit its own workdir (parallel-test flake) * hayro: ColorReplacement type and luminance mapping (reading colours, #897) * fmt: engine dates (upstream Greek localization miss) * hayro: apply ColorReplacement to solid text and line-art paints (#897) * render: ReadingColors view setting flows into RenderSettings (#897) * engine: per-document reading colours state (#897) * automation: view_reading_colors tool; page_render honours it (#897) * ui: Reading colours preference (Replace Document Colors, #897) * ui: seed reading colours on revision and signed-version opens (#897) * parity: a11y.replace-page-colors shipped (#897) * render: map stencil-mask paints through reading colours (#897) An ImageMask stencil's solid paint was baked into the raster bytes raw, bypassing the reading-colours hook every other solid fill goes through: under white-on-black, CCITT scans, JBIG2 text and stencil logos drew black ink on the black mapped background and vanished. Route it through replaced(paint, false) — stencils are line art in disguise — and cover it with an ImageMask fixture test sampling mapped ink on a mapped background. * render: print previews render with reading colours off (#897) Print previews went through the document's render pool, whose config now carries the reading colours: a white-on-black user saw black sheets in the Print dialog while the actual print stayed uncoloured. The request tag is the per-request channel that already crosses the render boundary, so PRINT_TAG now lives in pdfcraft_render and the renderer honours it by rendering previews with reading colours off — a preview's job is fidelity to the printout. The main view stays recoloured. Covered on both render paths (inline PageRenderer and pool worker). * ui: seed reading colours on created-document opens (#897) open_created (comment summaries) and open_created_bytes (images, text, blank pages, clipboard) pushed new DocViews without seeding the reading colours, unlike every other open path. A created document now starts with the app-wide preference too; the seed-on-open test drives both paths. * docs: reading-colours flag echo and display-fidelity parity notes (#897) The view_reading_colors description now says a flag that differs from the mode's preset default makes the echoed mode read custom, and the a11y.replace-page-colors parity notes record that print previews and view snapshots render with the document's true colours: reading colours apply to the reading view only. * Merge follow-ups: reading colours beside preview renders and the new catalogs - Renderer::new carries both color_replacement and the new preview flag - our raster tests construct RenderRequest with preview: false - the preference dialog grew past the window: scroll the combo into view and give the fixture a valid xref so no repair banner covers the dialog - checkboxes use the crate's square-box widget (clippy disallows egui's) - Kazakh and Turkish catalogs gain the ten reading-colours strings * Reading colours: record the hayro patch in vendor/README.md; add missing translations vendor/README.md gains hayro patch (13): `RenderSettings::color_replacement` / `ColorReplacement`, the `render_pdf` signature change and the removed `[dev-dependencies.log]`, with its tests. Adds the ten reading-colours labels to el, es, pl, te and zh-hant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
123 lines
3.0 KiB
TOML
123 lines
3.0 KiB
TOML
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
|
#
|
|
# When uploading crates to the registry Cargo will automatically
|
|
# "normalize" Cargo.toml files for maximal compatibility
|
|
# with all versions of Cargo and also rewrite `path` dependencies
|
|
# to registry (e.g., crates.io) dependencies.
|
|
#
|
|
# If you are reading this file be aware that the original Cargo.toml
|
|
# will likely look very different (and much more reasonable).
|
|
# See Cargo.toml.orig for the original contents.
|
|
|
|
[package]
|
|
edition = "2024"
|
|
rust-version = "1.92"
|
|
name = "hayro"
|
|
version = "0.7.1"
|
|
authors = ["Laurenz Stampfl <laurenz.stampfl@gmail.com>"]
|
|
build = false
|
|
autolib = false
|
|
autobins = false
|
|
autoexamples = false
|
|
autotests = false
|
|
autobenches = false
|
|
description = "A rasterizer for PDF files."
|
|
readme = "README.md"
|
|
license = "Apache-2.0 OR MIT"
|
|
repository = "https://github.com/LaurenzV/hayro"
|
|
resolver = "2"
|
|
|
|
[features]
|
|
default = [
|
|
"embed-fonts",
|
|
"embed-cmaps",
|
|
]
|
|
embed-cmaps = ["hayro-interpret/embed-cmaps"]
|
|
embed-fonts = ["hayro-interpret/embed-fonts"]
|
|
logging = ["hayro-interpret/logging"]
|
|
|
|
[lib]
|
|
name = "hayro"
|
|
path = "src/lib.rs"
|
|
|
|
[[example]]
|
|
name = "render"
|
|
path = "examples/render.rs"
|
|
|
|
[dependencies.bytemuck]
|
|
version = "1"
|
|
features = ["bytemuck_derive"]
|
|
|
|
[dependencies.hayro-interpret]
|
|
version = "0.7.0"
|
|
default-features = false
|
|
|
|
[dependencies.image]
|
|
version = "0.25"
|
|
features = ["png"]
|
|
default-features = false
|
|
|
|
[dependencies.kurbo]
|
|
version = "0.13.0"
|
|
|
|
# PdfCraft patch: report image resampling fallbacks through the application's logger.
|
|
[dependencies.log]
|
|
version = "0.4"
|
|
|
|
[dependencies.pic-scale]
|
|
version = "0.7.9"
|
|
features = [
|
|
"neon",
|
|
"rdm",
|
|
"sse",
|
|
"avx",
|
|
]
|
|
default-features = false
|
|
|
|
[dependencies.vello_cpu]
|
|
version = "0.0.8"
|
|
features = [
|
|
"std",
|
|
"png",
|
|
"u8_pipeline",
|
|
]
|
|
default-features = false
|
|
|
|
# PdfCraft patch: the upstream-only `[dev-dependencies.log]` entry is removed (log is a normal
|
|
# dependency since the logging patch), so `cargo test -p hayro` can run this crate's unit tests
|
|
# even though a patched non-workspace crate may not require dev-dependencies.
|
|
[lints.clippy]
|
|
collection_is_never_read = "warn"
|
|
dbg_macro = "warn"
|
|
debug_assert_with_mut_call = "warn"
|
|
default_trait_access = "warn"
|
|
doc_markdown = "warn"
|
|
fn_to_numeric_cast_any = "warn"
|
|
infinite_loop = "warn"
|
|
large_stack_arrays = "warn"
|
|
mismatching_type_param_order = "warn"
|
|
negative_feature_names = "warn"
|
|
redundant_feature_names = "warn"
|
|
same_functions_in_if_condition = "warn"
|
|
semicolon_if_nothing_returned = "warn"
|
|
todo = "warn"
|
|
too_many_arguments = "allow"
|
|
unseparated_literal_suffix = "warn"
|
|
use_self = "warn"
|
|
wildcard_dependencies = "warn"
|
|
|
|
[lints.rust]
|
|
elided_lifetimes_in_paths = "warn"
|
|
keyword_idents_2024 = "forbid"
|
|
missing_docs = "warn"
|
|
non_ascii_idents = "forbid"
|
|
non_local_definitions = "forbid"
|
|
trivial_numeric_casts = "warn"
|
|
unnameable_types = "warn"
|
|
unreachable_pub = "warn"
|
|
unsafe_op_in_unsafe_fn = "forbid"
|
|
unused_import_braces = "warn"
|
|
unused_lifetimes = "warn"
|
|
unused_macro_rules = "warn"
|
|
unused_qualifications = "warn"
|