M10.5: Keep the adoption current with main progress and viewer fixes

This commit is contained in:
skylar taylor-barrick 2026-10-12 01:28:15 +02:00
commit 78f7ee0454
30 changed files with 471 additions and 42 deletions

View File

@ -7,7 +7,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Greek UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "fbc7790b5e9afd591b3bfbe0582f004f345b42d988989d81fdf38f312331fa01"
sha256 = "bd7d565bff34f6f73b90b0884f480b9f39b106d5c96953e17c68619f03385a57"
# ATTRIBUTION.toml: one entry per asset (AGENTS.md §1). The source of truth for provenance and licences.
# ATTRIBUTION.md is generated from this file: `cargo xtask assets --write`. Checked by `cargo xtask assets` (part of `xtask ci`).
@ -30,7 +30,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Simplified Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "fc734b2f2530561f8630f5d7112a237201012789b1d9167d3068b4ddb7b22f43"
sha256 = "de11e8f3b126092b584beb8b22ea8952ff6cbc79d42c417663843be93c807bc4"
[[asset]]
path = "crates/ui-egui/src/i18n/zh-hant.tsv"
@ -41,7 +41,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Traditional Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "379d0dc6203104e0f07ea0ed1e74a365c8eec7f9cf2bf525078dac0cf58b6372"
sha256 = "8ddfd156833e29d8584dab85520264d8e5d77bfcdb5ea994577acc1a9644936b"
[[asset]]
path = "crates/ui-egui/src/i18n/cs.tsv"
@ -52,7 +52,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Czech UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "b416309efba61009d4ed92c932cf1b23bb4f3a53d0d7d35cf61bf9c3d7a011ef"
sha256 = "67abad667c05dc10bc9bffab5302978bc73b8314f63f78b543cdece4b5cea6d7"
[[asset]]
path = "crates/ui-egui/src/i18n/pt-br.tsv"
@ -63,7 +63,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Brazilian Portuguese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "066efa560b0dc5554c85194dcfb3190e03fce75145d52151bdcf7734f1829f7e"
sha256 = "a8d35613c888904ce6e984560c06d54a3c6f9828fa840c733eb9f2f893b8c0ee"
[[asset]]
path = "crates/ui-egui/src/i18n/es.tsv"
@ -74,7 +74,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Spanish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "9061bbb9b21008b4c312b5158ed3c338cfbcb3b563e9e57b81cf72d075c9eadf"
sha256 = "9f8a39143000bc909ee24617518c41f3aefaaeace341002e403d94a9eb51c984"
[[asset]]
path = "crates/ui-egui/src/i18n/fr.tsv"
@ -85,7 +85,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "French UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "068211fb4b246e1cb0ecb66598101f1c974e0313e1323e6acd522817f7f3bb57"
sha256 = "a099eb8c6c4bdbd62dc32efef97b4bef718c0170492e6921568d48e46499c964"
[[asset]]
path = "crates/ui-egui/src/i18n/de.tsv"
@ -96,7 +96,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "German UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "a2228f72e63c83959ea0ee7b1641bcf31e13b3c58fab62caebbd50f8d8d5c231"
sha256 = "e59dc41d7628503fd241689efb69641bcf31733a204f3cd492ac88d66c76c6a0"
[[asset]]
path = "crates/ui-egui/src/i18n/te.tsv"
@ -107,7 +107,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Telugu UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "8c2b1625fb84fa7c9279d2ca0d6a22c808514d6361cf3c547a7ee21c64d170ae"
sha256 = "c6ab6587ad3ecd56efb019a18eb71f92fca33c43ead8eb9fc3262b8c56e5beb1"
[[asset]]
path = "crates/ui-egui/src/i18n/it.tsv"
@ -118,7 +118,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Italian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "394d322e782343f95c3b9cce603a77b7e3a6625000540a17f45b55b7233e7662"
sha256 = "1fa0e8bba340d78ecf2a3c9ae319b34e99811082950ebf4aee5e7f5eb0bdab22"
[[asset]]
path = "crates/ui-egui/src/i18n/pl.tsv"
@ -129,7 +129,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Polish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "5c5c0420cf58767312b132b9f9cb3c23131b58b831feae3e47b421f1081fe60b"
sha256 = "4297893b78fa25368d9bb6e10485fb3ede866ed470e528001de0120ea2f0915b"
[[asset]]
path = "crates/ui-egui/src/i18n/ru.tsv"
@ -140,7 +140,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Russian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "1d130f3f7112ac99693c5048a96405f3371dbe893d5c618f2910b8e80b6be28c"
sha256 = "a84ccfd96c9704d1630d6b42b1c50298a0ea5791b063ff2bbe1ccc993f87cc47"
[[asset]]
path = "crates/ui-egui/src/i18n/hu.tsv"
@ -151,7 +151,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Hungarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "a6ff8309a391acc428cb67e834196e14919ab5cc0f2d9befcbfb532d2ec4ca82"
sha256 = "da6aee2a47ec15193a3d88f8116f2b81ec1ac815b9481eb9c36d48518625df30"
[[asset]]
path = "crates/ui-egui/src/i18n/bg.tsv"
@ -162,7 +162,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Bulgarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "40391d7be25e2a4e59cb1419df733935e69dd728fb0a3404575edc6807f27924"
sha256 = "122cc1b0a346a8ff4cb7ede77775afbd326e82c9bfd6bda06f895ac100702144"
[[asset]]
path = "crates/ui-egui/src/i18n/kk.tsv"
@ -173,7 +173,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Kazakh UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "27fa6fae5ad0005f90a13612aa1eb8189061110eab8d6b6e7a83899af54f13e9"
sha256 = "5eb3ccd3c7613fd54b4a217ddaf32f29a37efb29373787a3178209ae3aca12a5"
[[asset]]
path = "crates/ui-egui/src/i18n/ja.tsv"
@ -184,7 +184,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Japanese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "f4e6217dfc370ffa947c07b8c23bfa7d8f3824d881d7d51062b471b95f378c82"
sha256 = "ffbf8a2c117d75b008361e882c96c9d7cad8844e791800a60174eacf96e3c89a"
[[asset]]
path = "crates/ui-egui/src/i18n/uk.tsv"
@ -195,7 +195,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Ukrainian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "c3f539ce99a39a6f7a89740da9b7aab9643014613bfef1891efe777dc5cf057a"
sha256 = "424e5f16bead85250d142e791b5e8a874c9905025be052ed8aef1f1645e5585a"
[[asset]]
path = "crates/ui-egui/src/i18n/ar.tsv"
@ -206,7 +206,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Arabic UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "1cf9e140b348f1e8ceb399a8f079cae392085d9f432e3e1b9d94cd1039a1c4b8"
sha256 = "63d26bec54aa6e9f9c4b6e4dc16b872a41ace7feec825c888633992ca1507148"
[[asset]]
path = "crates/ui-egui/src/i18n/tr.tsv"
@ -217,7 +217,7 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Turkish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "9d52789a71fe9b0a7cc74cfd6e9e6d0a8b3d9b9a866922676e376f1431d1cae3"
sha256 = "0b330a5e739159d02a8214af4655e954cba59861ca30b914614ffb0f2735e52d"
[[asset]]
path = "assets/icons/accessibility.svg"
@ -3339,4 +3339,4 @@ licence = "MIT OR Apache-2.0"
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Slovene UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
sha256 = "c5e3a75359a8faadb9efa9ac4ff31963cf9124c20269a1e21715bcabde5e1292"
sha256 = "7071df48ebdb362914f404deebebc84252550d10d08f333892584230efa6c1d6"

View File

@ -2,7 +2,8 @@
**Stage: alpha** · next: beta, ~26% (ready for real work 49% → 75%) and ~400–700 h away
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-12 · **Change:** minor (shared print CI reconciliation and driver duplex capability; M10, #1028: OCR reads pictures on pages that have text, on request); earlier: M14 #307 Plan 3 uses one marker traversal on open and full refresh, and the combined scanner borrows metadata instead of cloning scan-only containers; includes a behavior-preserving `organize` binding for the workspace Clippy gate · earlier: minor (localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M2 short same-line redraws split before placement; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (M10, #1028: OCR reads pictures on pages that have text, on request); earlier: M14 #307 Plan 3 uses one marker traversal on open and full refresh, and the combined scanner borrows metadata instead of cloning scan-only containers; includes a behavior-preserving `organize` binding for the workspace Clippy gate · earlier: minor (localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (#594 paragraph drags validated in the Linux test environment; localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (architectural paper controls from #599; localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (closed issues synced: #774, #756 and the #799–#821 batch; earlier: localized shortcut labels, #496; readiness table with hours per audience; full number as weighted sum 49%; earlier: second look: ready 40% → 47%, mainstream 55% added; core-workflow gate applied → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
@ -136,6 +137,7 @@ Ranked; detail and the full milestone table in [docs/roadmap.md](docs/roadmap.md
## Progress log
- **2026-10-12 (M2, short text redraws):** Same-line redraws that restart a matching three-glyph prefix after more than one glyph-height of progress split before placement, so short doubled words no longer interleave. The existing redraw-position tolerance is reused; controls cover negative TJ movement, combining marks, RTL, CJK, vertical and turned text. Estimates unchanged.
- **2026-10-11 (M10.5, focused follow-up to #599):** Carry the architectural/ANSI/large ISO paper presets, current-page matching at 100%, and previewed PDF scale into the current print dialog and `doc_print`. Retains the #847/#1007 spooler and background discovery. Driver substitution, physical calibration, vector Windows printing and managed-endpoint restrictions remain separate gaps. Overall estimates unchanged.
Newest first: the date, what moved, and the new overall estimate.

View File

@ -0,0 +1,14 @@
#[test]
fn winit_carries_the_x11_server_dpi_fallback() {
// The behavior tests live beside the policy in winit (util::randr::tests).
// This guards PdfCraft's vendored copy, which workspace tests do not test itself.
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
let randr = std::fs::read_to_string(root.join("vendor/winit/src/platform_impl/linux/x11/util/randr.rs")).unwrap();
assert!(randr.contains("let screen = self.default_root();"));
assert!(randr.contains("default_dpi_factor(\n self.get_xft_dpi(),"));
assert!(randr.contains("screen.width_in_millimeters.into()"));
assert!(randr.contains("calc_dpi_factor(screen_pixels, screen_mm)"));
assert!(randr.contains("server_dpi_wins_over_the_panels_physical_density"));
let desktop = std::fs::read_to_string(root.join("packaging/linux/ai.storyteller.pdfcraft.desktop")).unwrap();
assert!(!desktop.contains("WINIT_X11_SCALE_FACTOR"));
}

View File

@ -740,6 +740,10 @@ const REDRAW_CANDIDATES: usize = 32;
/// Pair tests that the collision sweep may make per glyph of a segment. Ordinary text overlaps each glyph with about one
/// neighbour, so it stays far below this. A segment that needs more is dense, and [`collide`] joins its runs instead.
const COLLIDE_PAIRS_PER_GLYPH: usize = 16;
/// Glyph positions within a fifth of their height are considered the same for redraws.
const REDRAW_POSITION_TOLERANCE: f32 = 0.2;
/// A reset needs three matching glyphs at the start of the run, keeping local kerning from splitting it.
const REDRAW_PREFIX_GLYPHS: usize = 3;
/// Reusable buffers, so a page allocates them once rather than per segment. Glyph placement works in them, one
/// segment at a time, when the segment is emitted.
@ -818,13 +822,44 @@ fn redraws(glyphs: &[&TextGlyph], a: Run, b: Run) -> bool {
a.len() == b.len()
&& a.range().zip(b.range()).all(|(i, j)| match (glyphs.get(i), glyphs.get(j)) {
(Some(p), Some(g)) => {
let tol = 0.2 * (g.rect[3] - g.rect[1]).max(0.1);
let tol = REDRAW_POSITION_TOLERANCE * (g.rect[3] - g.rect[1]).max(0.1);
p.text == g.text && (p.rect[0] - g.rect[0]).abs() < tol && (p.rect[1] - g.rect[1]).abs() < tol
}
_ => false,
})
}
fn within_position_tolerance(a: f32, b: f32, tolerance: f32) -> bool {
(a - b).abs().partial_cmp(&tolerance) == Some(std::cmp::Ordering::Less)
}
/// Whether `next` restarts `start` after the run has advanced by a glyph height. The fixed prefix
/// bounds this check and requires more than a single backward adjustment to split a run.
fn restarts_run(glyphs: &[&TextGlyph], start: usize, next: usize, progress: f32) -> bool {
let (Some(first), Some(candidate)) = (glyphs.get(start), glyphs.get(next)) else { return false };
let tol = REDRAW_POSITION_TOLERANCE * (candidate.rect[3] - candidate.rect[1]).max(0.1);
if first.text != candidate.text
|| !within_position_tolerance(first.rect[0], candidate.rect[0], tol)
|| !within_position_tolerance(first.rect[1], candidate.rect[1], tol)
{
return false;
}
let h = (first.rect[3] - first.rect[1]).max(0.1);
if !progress.is_finite() || progress <= h {
return false;
}
for offset in 1..REDRAW_PREFIX_GLYPHS {
let (Some(a), Some(b)) = (start.checked_add(offset).and_then(|i| glyphs.get(i)), next.checked_add(offset).and_then(|i| glyphs.get(i))) else {
return false;
};
let tol = REDRAW_POSITION_TOLERANCE * (b.rect[3] - b.rect[1]).max(0.1);
if a.text != b.text || !within_position_tolerance(a.rect[0], b.rect[0], tol) || !within_position_tolerance(a.rect[1], b.rect[1], tol) {
return false;
}
}
true
}
/// Puts a segment's glyphs in visual reading order into `sc.placed`, and its forced word breaks into `sc.breaks`.
///
/// Glyphs are placed by x. Runs that collide, meaning that glyphs of different runs overprint each other, stay whole
@ -1059,6 +1094,8 @@ fn arrange(glyphs: &[TextGlyph]) -> (Vec<usize>, Vec<u32>, Vec<bool>) {
// 1. Segments in content order. Every run is a range of consecutive glyphs.
let mut segs: Vec<Seg> = Vec::new();
let mut run_start_x = 0.0;
let mut furthest_progress = 0.0;
for i in 0..n {
let g = glyphs[i].rect;
let cont = segs.last().is_some_and(|s| {
@ -1067,12 +1104,19 @@ fn arrange(glyphs: &[TextGlyph]) -> (Vec<usize>, Vec<u32>, Vec<bool>) {
let gap = g[0] - glyphs[p].rect[2];
(cy(i) - cy(p)).abs() < ph * 0.5 && gap < ph * 3.0 && g[0] > glyphs[p].rect[0] - ph * 2.0
});
if cont && let Some(s) = segs.last_mut() {
let reset = cont && segs.last().is_some_and(|s| restarts_run(&glyphs, s.first.start, i, furthest_progress));
if cont
&& !reset
&& let Some(s) = segs.last_mut()
{
s.first.end = i + 1;
union(&mut s.bbox, &g);
s.h = s.h.max(height(i));
furthest_progress = furthest_progress.max((g[0] - run_start_x).abs()).max((g[2] - run_start_x).abs());
} else {
segs.push(Seg::new(Run { start: i, end: i + 1 }, g, height(i)));
run_start_x = g[0];
furthest_progress = 0.0;
}
}
// A run that redraws an earlier run at the same place (doubled or shadowed text) is dropped, as a doubled glyph is
@ -1606,6 +1650,69 @@ mod tests {
extract_page(&text_page(ops), 0, &InterpreterSettings::default()).unwrap().plain_text()
}
#[test]
fn short_doubled_word_at_same_origin_does_not_interleave() {
let ops = "BT /F1 12 Tf 50 Tz 1 0 0 1 100 200 Tm (world) Tj ET\n".repeat(2);
assert_single_word(page_glyphs(&ops));
}
#[test]
fn short_near_shadow_does_not_interleave() {
let ops = "BT /F1 12 Tf 50 Tz 1 0 0 1 100 200 Tm (world) Tj ET\nBT /F1 12 Tf 50 Tz 1 0 0 1 101 200 Tm (world) Tj ET\n";
assert_single_word(page_glyphs(ops));
}
#[test]
fn turned_short_doubled_word_does_not_interleave() {
let one = turned(37.0, 1, 12.0, 100.0, 200.0, "50 Tz (world) Tj");
assert_single_word(page_glyphs(&(one.clone() + &one)));
}
#[test]
fn large_backward_tj_adjustment_stays_in_one_run() {
let text = page_glyphs("BT /F1 12 Tf 50 Tz 1 0 0 1 100 200 Tm [(wor) 3000 (ld)] TJ ET");
assert_eq!(text.plain_text(), "ld wor");
assert_eq!(text.glyphs.iter().map(|g| g.text.as_str()).collect::<Vec<_>>(), ["l", "d", "w", "o", "r"]);
assert!(text.line_of.iter().all(|line| *line == 0));
assert_eq!(text.space_before, [false, false, true, false, false]);
}
#[test]
fn reset_prefix_requires_one_glyph_height_of_progress() {
let mut glyphs = Vec::new();
word(&mut glyphs, "abc", 10.0, 10.0, 6.0);
word(&mut glyphs, "abc", 10.0, 10.0, 6.0);
let glyphs: Vec<&TextGlyph> = glyphs.iter().collect();
assert!(!restarts_run(&glyphs, 0, 3, 9.99));
assert!(!restarts_run(&glyphs, 0, 3, 10.0));
assert!(restarts_run(&glyphs, 0, 3, 10.01));
}
#[test]
fn reset_prefix_uses_the_existing_redraw_position_tolerance() {
let mut near = Vec::new();
word(&mut near, "abc", 10.0, 10.0, 6.0);
word(&mut near, "abc", 11.99, 10.0, 6.0);
let near: Vec<&TextGlyph> = near.iter().collect();
assert!(restarts_run(&near, 0, 3, 10.01));
let mut far = Vec::new();
word(&mut far, "abc", 10.0, 10.0, 6.0);
word(&mut far, "abc", 12.01, 10.0, 6.0);
let far: Vec<&TextGlyph> = far.iter().collect();
assert!(!restarts_run(&far, 0, 3, 10.01));
}
#[test]
fn reset_prefix_rejects_non_finite_positions() {
let mut glyphs = Vec::new();
word(&mut glyphs, "abc", 10.0, 10.0, 6.0);
word(&mut glyphs, "abc", 10.0, 10.0, 6.0);
glyphs[3].rect[0] = f32::NAN;
let glyphs: Vec<&TextGlyph> = glyphs.iter().collect();
assert!(!restarts_run(&glyphs, 0, 3, 10.01));
}
#[test]
fn turned_lines_group_along_their_baseline() {
// Two lines 13 pt apart, words separated by TJ offsets (no space glyphs), the second
@ -1703,6 +1810,13 @@ mod tests {
extract_page(&text_page(ops), 0, &InterpreterSettings::default()).unwrap()
}
fn assert_single_word(text: PageText) {
assert_eq!(text.plain_text(), "world");
assert_eq!(text.glyphs.iter().map(|g| g.text.as_str()).collect::<String>(), "world");
assert_eq!(text.line_of, [0; 5]);
assert_eq!(text.space_before, [false; 5]);
}
#[test]
fn runs_printed_over_each_other_stay_whole_at_any_angle() {
// Two runs that start at one point (exact overprint), that start 40 pt along and 3 pt down

View File

@ -2995,6 +2995,9 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
view.viewport_screen = out.inner_rect;
view.auto_scroll.paint(ui, avail);
if unobstructed && matches!(tool, QuickTool::Select | QuickTool::ColumnSelect) {
selection_actions(ui, avail, view, info, prefs, allowed && !comments_hidden);
}
// Collect all main-page demand, including cached surfaces, for byte admission later.
// Pan-settle debounce for tiled pages: each tile costs a full page interpret, so holding
@ -3263,6 +3266,92 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
quick_bar(app, avail, ui);
}
#[derive(Clone, Copy)]
enum SelectionAction {
Note,
Markup(comments::CommentTool),
Replace,
Copy,
}
/// Actions on an existing text selection, next to the selected words.
fn selection_actions(ui: &mut egui::Ui, viewport: Rect, view: &mut DocView, info: &DocInfo, prefs: &comments::CommentPrefs, can_comment: bool) {
if ui.input(|input| input.pointer.is_decidedly_dragging()) {
return;
}
let Some(selection) = view.selection else { return };
let Some(text) = view.texts.get(&selection.page) else { return };
let Some(xf) = view.page_xform(selection.page) else { return };
let Some(last) = selection.rects(text).last().copied() else { return };
let selected = selection.text(text);
if selected.is_empty() {
return;
}
let rect = xf.view_rect(last);
if !viewport.intersects(rect) {
return;
}
let x = rect.left().clamp(viewport.left() + 8.0, (viewport.right() - 520.0).max(viewport.left() + 8.0));
let y = if rect.bottom() + 48.0 < viewport.bottom() { rect.bottom() + 6.0 } else { (rect.top() - 44.0).max(viewport.top() + 6.0) };
let mut chosen = None;
egui::Area::new(egui::Id::new(("text-selection-actions", view.id.0))).order(egui::Order::Foreground).fixed_pos(pos2(x, y)).show(ui.ctx(), |ui| {
egui::Frame::popup(ui.style()).show(ui, |ui| {
ui.horizontal(|ui| {
for (label, action) in [
(tl!("Add comment"), SelectionAction::Note),
(tl!("Highlight"), SelectionAction::Markup(comments::CommentTool::Highlight)),
(tl!("Underline"), SelectionAction::Markup(comments::CommentTool::Underline)),
(tl!("Strikethrough"), SelectionAction::Markup(comments::CommentTool::StrikeOut)),
(tl!("Replace text"), SelectionAction::Replace),
] {
if ui.add_enabled(can_comment, egui::Button::new(label)).clicked() {
chosen = Some(action);
}
}
if ui.button(tl!("Copy")).clicked() {
chosen = Some(SelectionAction::Copy);
}
});
});
});
let Some(action) = chosen else { return };
if let SelectionAction::Copy = action {
ui.ctx().copy_text(selected);
return;
}
let Some((page, quads)) = view.selection_quads(info) else { return };
let last = quads.last().copied().unwrap_or_default();
let at = [last[2].max(last[6]), last[1].max(last[3])];
view.clear_selection();
match action {
SelectionAction::Note | SelectionAction::Replace => {
if matches!(action, SelectionAction::Replace) {
view.comments.replace = Some(quads);
}
view.comments.composer = Some(comments::Composer {
page,
at,
kind: if matches!(action, SelectionAction::Replace) { comments::ComposerKind::Replace } else { comments::ComposerKind::Note },
text: String::new(),
focus: true,
});
}
SelectionAction::Markup(tool) => {
// Every markup button carries a markup tool; anything else adds nothing.
let Some(kind) = tool.markup() else { return };
view.pending_edit = Some(Edit::AddAnnotation(pdfcraft_engine::NewAnnotation {
page,
shape: pdfcraft_engine::Shape::TextMarkup { kind, quads },
style: prefs.style(tool),
contents: String::new(),
author: prefs.author.clone(),
}));
}
// Copied above.
SelectionAction::Copy => {}
}
}
/// Run a push button's action (the ones that need no JavaScript engine).
fn run_button(app: &mut PdfCraftApp, index: usize, name: &str, action: pdfcraft_engine::form_scripts::ButtonAction) {
use pdfcraft_engine::form_scripts::ButtonAction as B;

View File

@ -2274,3 +2274,4 @@ scroll speed Fast سريعة
Black and white أبيض وأسود
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… لا يقبل برنامج تشغيل هذه الطابعة إعدادات الطباعة على الوجهين من البرامج الأخرى، لذا يُطبَّق إعداده الخاص. غيّره من خصائص…
Tools panel side جانب لوحة الأدوات
Add comment إضافة تعليق

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2216,3 +2216,4 @@ scroll speed Fast Висока
Black and white Черно-бяло
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйверът на този принтер не приема настройки за двустранен печат от други програми и прилага собствената си настройка. Променете я от Свойства…
Tools panel side Страна на панела с инструменти
Add comment Добавяне на коментар

Can't render this file because it contains an unexpected character in line 8 and column 16.

View File

@ -2330,3 +2330,4 @@ scroll speed Fast Rychlá
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Písmo tohoto pole neumí zobrazit „{c}“ ({code}), proto PdfCraft místo něj ukazuje ?. Hodnota se uloží a jiné prohlížeče PDF pole podle ní překreslí.
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Písma, kterými PdfCraft píše, neumí zobrazit „{c}“ ({code}), proto se ve všech prohlížečích PDF zobrazí jako ?. Text se uloží.
Tools panel side Strana panelu nástrojů
Add comment Přidat komentář

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2254,3 +2254,4 @@ scroll speed Fast Schnell
Black and white Schwarzweiß
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Der Treiber dieses Druckers übernimmt keine Einstellungen für beidseitigen Druck von anderen Programmen, daher gilt seine eigene Einstellung. Ändern unter Eigenschaften…
Tools panel side Seite des Werkzeugbereichs
Add comment Kommentar hinzufügen

Can't render this file because it contains an unexpected character in line 6 and column 51.

View File

@ -2272,3 +2272,4 @@ scroll speed Fast Γρήγορη
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Η γραμματοσειρά αυτού του πεδίου δεν μπορεί να σχεδιάσει το «{c}» ({code}), γι' αυτό το PdfCraft δείχνει ? στη θέση του. Η τιμή αποθηκεύεται και άλλα προγράμματα προβολής PDF επανασχεδιάζουν το πεδίο από αυτήν.
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Οι γραμματοσειρές με τις οποίες γράφει το PdfCraft δεν μπορούν να σχεδιάσουν το «{c}» ({code}), γι' αυτό εμφανίζεται ως ? σε κάθε πρόγραμμα προβολής PDF. Το κείμενο αποθηκεύεται.
Tools panel side Πλευρά πλαισίου εργαλείων
Add comment Προσθήκη σχολίου

Can't render this file because it has a wrong number of fields in line 5.

View File

@ -85,6 +85,8 @@
Display theme Tema de visualización
Side panels Paneles laterales
Enable Acrobat JavaScript Activar Acrobat JavaScript
Flatten Fill & Sign when saving Acoplar Rellenar y firmar al guardar
Text, marks and signatures become part of the page. Other comments stay editable. El texto, las marcas y las firmas pasan a formar parte de la página. Los demás comentarios siguen siendo editables.
OK Aceptar
Join our Discord Únete a nuestro Discord
Close Cerrar
@ -656,7 +658,7 @@
Social Security Number Número de la Seguridad Social
Arbitrary Mask Máscara arbitraria
Mask: Máscara:
9 digit, A letter, O letter or digit, X any character 9 dígito, A letra, O letra o dígito, X cualquier carácter
9 digit, A letter, O letter or digit, X any character 9: dígito; A: letra; O: letra o dígito; X: cualquier carácter
Example: {sample} Ejemplo: {sample}
Field value is not validated El valor del campo no se valida
Field value is in range: El valor del campo está en el intervalo:
@ -785,6 +787,7 @@
Rotation Rotación
Appear behind page Mostrar detrás de la página
Appear on top of page Mostrar encima de la página
Offset from centre Desplazamiento desde el centro
From colour A partir de un color
Page Range Options Opciones de intervalo de páginas
Preview: page {p} of {n} Vista previa: página {p} de {n}
@ -923,6 +926,7 @@
Remove hidden information, metadata, scripts and embedded content, and rewrite the files. Quita la información oculta, los metadatos, los scripts y el contenido incrustado, y reescribe los archivos.
Type text Escribe texto
Text to insert Texto que insertar
Inserted text Texto insertado
Replacement text Texto de reemplazo
Edit text… Editar texto…
Add a sticky note here Añadir una nota adhesiva aquí
@ -933,6 +937,7 @@
This comment's appearance can't be changed yet. El aspecto de este comentario todavía no se puede cambiar.
Icon Icono
Thickness Grosor
Line ending Extremo de línea
Modified Fecha de modificación
No status has been set. No se ha establecido ningún estado.
Compare Files Comparar archivos
@ -1226,7 +1231,7 @@
1 mark 1 marca
{n} marks {n} marcas
Dynamic Dinámicos
Sign Here Firme aquí
Sign Here Firma aquí
Standard Business Empresariales estándar
Choose a stamp, then click on the page to place it. Elige un sello y haz clic en la página para colocarlo.
Note Nota
@ -1584,6 +1589,7 @@
Looking for printers… Buscando impresoras…
Sending to {printer}… Enviando a {printer}…
Choose a folder for the searchable files Elige una carpeta para los archivos con búsqueda
Files are combined in this order. Leave Pages empty to take every page. Los archivos se combinan en este orden. Deja Páginas vacío para incluir todas las páginas.
Files are combined from top to bottom. Leave Pages empty to take every page. Los archivos se combinan de arriba abajo. Deja Páginas vacío para incluir todas las páginas.
Unlock… Desbloquear…
Select a password-protected file first Selecciona primero un archivo protegido con contraseña
@ -1610,6 +1616,11 @@
Add folder and subfolders Añadir carpeta y subcarpetas
No PDFs, images or text files found in {folder} No se encontraron PDF, imágenes ni archivos de texto en {folder}
Added the first {n} files in {folder} Se añadieron los primeros {n} archivos de {folder}
comment menu Edit Editar
Undo {action} Deshacer {action}
Redo {action} Rehacer {action}
certificate Subject Titular
action wizard Start Iniciar
Click to sort, drag to move the column. Drag its edge to resize it. Haz clic para ordenar; arrastra para mover la columna. Arrastra su borde para cambiar el ancho.
Reset columns Restablecer columnas
Remove {n} files Quitar {n} archivos
@ -2031,7 +2042,73 @@
Default page display Presentación de página predeterminada
Default zoom Zoom predeterminado
Used when a PDF doesn't ask for a layout or zoom. Continuous scrolling never snaps between pages. Se usa cuando un PDF no pide una presentación ni un zoom. El desplazamiento continuo nunca salta de página en página.
Show Mostrar
Sort Ordenar
Reverse the order Invertir el orden
Grab bag Miscelánea
Table Tabla
Username Nombre de usuario
Display name Nombre para mostrar
Real name Nombre real
Name (A–Z) Nombre (A–Z)
Merged PRs PR fusionados
PRs PR
Commits Commits
Lines added Líneas añadidas
+LOC +LOC
Lines deleted Líneas eliminadas
−LOC −LOC
Line delta Diferencia de líneas
ΔLOC ΔLOC
Binary assets added Recursos binarios añadidos
+Bin +Bin
Binary assets removed Recursos binarios eliminados
−Bin −Bin
First commit Primer commit
First Primero
Last commit Último commit
Last Último
No contributor data was built into this copy. Esta copia no incluye datos de colaboradores.
No model credits were built into this copy. Esta copia no incluye créditos de modelos.
{n} contributors · {c} commits {n} colaboradores · {c} commits
Company Empresa
Model Modelo
% of all commits % de todos los commits
Lines +/− Líneas +/−
@{login}: {prs} PRs, {commits} commits, +{added} / −{deleted} lines (Δ {delta}), +{bin_added} / −{bin_deleted} binary assets, {first} – {last} @{login}: {prs} PR, {commits} commits, +{added} / −{deleted} líneas (Δ {delta}), +{bin_added} / −{bin_deleted} recursos binarios, {first} – {last}
Reopen the files that were open when PdfCraft last closed Volver a abrir los archivos que estaban abiertos al cerrar PdfCraft por última vez
Add {what} Añadir {what}
Use {what} Usar {what}
Place saved {what} Colocar {what} desde lo guardado
Remove saved {what} Quitar {what} de lo guardado
A link Un enlace
A button Un botón
A script Un script
{who} in this document tried to open an address PdfCraft won't open: {e}. {who} de este documento intentó abrir una dirección que PdfCraft no abre: {e}.
{who} in this document tried to open an address PdfCraft won't open: {e}. Only web (http, https) and email (mailto) links open from documents. {who} de este documento intentó abrir una dirección que PdfCraft no abre: {e}. Desde los documentos solo se abren enlaces web (http, https) y de correo (mailto).
Another file dialog is still open. Finish with it first. Todavía hay otro cuadro de archivos abierto. Termina primero con ese.
Couldn't show the file picker. Please try again. No se pudo mostrar el selector de archivos. Inténtalo de nuevo.
The document changed while you were choosing a file, so nothing was changed. El documento cambió mientras elegías un archivo, así que no se modificó nada.
The document was closed before it could be saved. El documento se cerró antes de poder guardarlo.
The pages were extracted but not deleted, because the document changed while you were choosing a folder. Las páginas se extrajeron pero no se eliminaron, porque el documento cambió mientras elegías una carpeta.
That didn't work: an internal error stopped it ({m}). No ha funcionado: un error interno lo ha detenido ({m}).
The Windows store's digital IDs couldn't be listed: {e} No se pudieron listar los ID digitales del almacén de Windows: {e}
Align fields Alinear campos
Distribute fields Distribuir campos
Match field sizes Igualar el tamaño de los campos
Mark for redaction Marcar para censurar
Mark pages for redaction Marcar páginas para censurar
Change document properties Cambiar propiedades del documento
Mark differences Marcar diferencias
Run form script Ejecutar script del formulario
Scripted content must be usable with a keyboard and assistive technology. Check the document's scripts. El contenido con scripts debe poder usarse con teclado y con tecnologías de asistencia. Revisa los scripts del documento.
Table rows belong directly in a table or its head, body or foot. Fix the table's tags. Las filas de una tabla van directamente en la tabla o en su encabezado, cuerpo o pie. Corrige las etiquetas de la tabla.
Basic constraints Restricciones básicas
SHA-1 digest Huella SHA-1
SHA-256 digest Huella SHA-256
Squiggly Ondulado
Home / End Inicio / Fin
H / Space (hold) H / Espacio (mantener)
Reload documents when their files change on disk Recargar los documentos cuando sus archivos cambien en el disco
This file changed on disk. Reload it to see the new version; your unsaved changes will be lost. Este archivo ha cambiado en el disco. Recárgalo para ver la nueva versión; se perderán tus cambios sin guardar.
Reload Recargar
@ -2049,6 +2126,11 @@
Choose a PNG or JPEG image (up to 4 MiB). Transparency is preserved. Elige una imagen PNG o JPEG (hasta 4 MiB). Se conserva la transparencia.
Couldn't import the signature image: {e} No se pudo importar la imagen de la firma: {e}
Go to page… Ir a la página…
About Acerca de
Contributors Colaboradores
Models Modelos
Only continue if you trust this document. An address can carry information from the document, such as what you typed into its form. Continúa solo si confías en este documento. Una dirección puede llevar información del documento, como lo que escribiste en su formulario.
Print single-sided. Keep the sheets in order, cut at the marks, then stack the piles left to right, top to bottom. Imprime a una cara. Mantén las hojas en orden, corta por las marcas y apila los montones de izquierda a derecha y de arriba abajo.
For page sizes and margins. Para tamaños de página y márgenes.
The PDF text fonts can't draw “{c}” ({code}). Choose supported text. Las fuentes de texto PDF no pueden mostrar «{c}» ({code}). Elija texto compatible.
The standard fonts can't draw “{c}” ({code}). Only Western European characters can be added as text for now. Las fuentes estándar no pueden mostrar «{c}» ({code}). Por ahora solo se pueden añadir como texto caracteres de Europa occidental.
@ -2237,10 +2319,8 @@
Change Author Cambiar el autor
Change Subject Cambiar el asunto
Change Keywords Cambiar las palabras clave
Run form script Ejecutar el script del formulario
Save as {level} Guardar como {level}
Create links Crear enlaces
Mark differences Marcar diferencias
# Multi-object selection and movement (#844)
@plural {n} object selected|{n} objects selected {n} objeto seleccionado|{n} objetos seleccionados
@ -2288,19 +2368,22 @@ key Space Espacio
Tools Herramientas
Inspector Inspector
Select page {label} Seleccionar la página {label}
Rotate page {label} counterclockwise Girar la página {label} en sentido antihorario
Rotate page {label} clockwise Girar la página {label} en sentido horario
Rotate page {label} counterclockwise Girar la página {label} a la izquierda
Rotate page {label} clockwise Girar la página {label} a la derecha
Delete page {label} Eliminar la página {label}
Mouse wheel scroll speed Velocidad de desplazamiento de la rueda del ratón
scroll speed Slow Lenta
scroll speed Normal Normal
scroll speed Fast Rápida
Enhance camera image Mejorar foto de cámara
Drag the corners onto the document's edges, then choose Enhance page. Arrastre las esquinas hasta los bordes del documento y elija Mejorar página.
Drag the corners onto the document's edges, then choose Enhance page. Arrastra las esquinas hasta los bordes del documento y elige Mejorar página.
Enhance page Mejorar página
Certificate authority Autoridad de certificación
End entity Entidad final
Clean-up Limpieza
Original Original
Greyscale Escala de grises
Black and white Blanco y negro
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… El controlador de esta impresora no acepta los ajustes de doble cara de otros programas, así que se aplica su propio ajuste. Cámbielo en Propiedades…
Tools panel side Lado del panel de herramientas
Add comment Añadir comentario

Can't render this file because it contains an unexpected character in line 6 and column 60.

View File

@ -2253,3 +2253,4 @@ scroll speed Fast Rapide
Black and white Noir et blanc
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Le pilote de cette imprimante n'accepte pas les réglages recto verso des autres programmes ; son propre réglage s'applique. Modifiez-le dans Propriétés…
Tools panel side Côté du panneau Outils
Add comment Ajouter un commentaire

Can't render this file because it contains an unexpected character in line 6 and column 39.

View File

@ -2252,3 +2252,4 @@ scroll speed Fast Gyors
Black and white Fekete-fehér
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… A nyomtató illesztőprogramja nem fogadja el más programoktól a kétoldalas nyomtatás beállítását, ezért a saját beállítása érvényes. Módosítás: Tulajdonságok…
Tools panel side Az Eszközök panel oldala
Add comment Megjegyzés hozzáadása

Can't render this file because it contains an unexpected character in line 7 and column 44.

View File

@ -2262,3 +2262,4 @@ scroll speed Fast Veloce
Black and white Bianco e nero
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Il driver di questa stampante non accetta le impostazioni fronte-retro da altri programmi, quindi vale la sua impostazione. Modificala in Proprietà…
Tools panel side Lato del pannello Strumenti
Add comment Aggiungi commento

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2253,3 +2253,4 @@ scroll speed Fast 速い
Black and white 白黒
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… このプリンターのドライバーは他のプログラムからの両面印刷の設定を受け付けないため、ドライバー自身の設定が使われます。変更先: プロパティ…
Tools panel side ツールパネルの位置
Add comment コメントを追加

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2254,3 +2254,4 @@ scroll speed Fast Жылдам
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Бұл өрістің қаріпі «{c}» ({code}) таңбасын сала алмайды, сондықтан PdfCraft оның орнына ? көрсетеді. Мән сақталады, ал басқа PDF қарау құралдары өрісті соған қарап қайта салады.
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. PdfCraft жазатын қаріптер «{c}» ({code}) таңбасын сала алмайды, сондықтан ол барлық PDF қарау құралдарында ? болып көрінеді. Мәтін сақталады.
Tools panel side Құралдар панелінің жағы
Add comment Түсініктеме қосу

Can't render this file because it contains an unexpected character in line 813 and column 12.

View File

@ -2236,3 +2236,4 @@ scroll speed Fast Szybka
Black and white Czarno-biały
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Sterownik tej drukarki nie przyjmuje ustawień druku dwustronnego z innych programów, więc obowiązuje jego własne ustawienie. Zmień je w oknie Właściwości…
Tools panel side Strona panelu narzędzi
Add comment Dodaj komentarz

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2267,3 +2267,4 @@ scroll speed Fast Rápida
Black and white Preto e branco
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… O driver desta impressora não aceita configurações de frente e verso de outros programas, então vale a configuração dele. Altere em Propriedades…
Tools panel side Lado do painel Ferramentas
Add comment Adicionar comentário

Can't render this file because it contains an unexpected character in line 9 and column 16.

View File

@ -2166,3 +2166,4 @@ scroll speed Fast Высокая
Black and white Чёрно-белый
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйвер этого принтера не принимает настройки двусторонней печати от других программ, поэтому действует его собственная настройка. Измените её в окне Свойства…
Tools panel side Сторона панели инструментов
Add comment Добавить комментарий

Can't render this file because it contains an unexpected character in line 9 and column 16.

View File

@ -2261,3 +2261,4 @@ scroll speed Fast Hitro
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Pisava tega polja ne more prikazati »{c}« ({code}), zato PdfCraft namesto njega prikaže ?. Vrednost se shrani, drugi pregledovalniki PDF pa polje znova narišejo iz nje.
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Pisave, s katerimi piše PdfCraft, ne morejo prikazati »{c}« ({code}), zato se v vseh pregledovalnikih PDF prikaže kot ?. Besedilo se shrani.
Tools panel side Stran podokna z orodji
Add comment Dodaj komentar

Can't render this file because it contains an unexpected character in line 9 and column 16.

View File

@ -2169,3 +2169,4 @@ scroll speed Fast వేగంగా
Greyscale గ్రేస్కేల్
Black and white నలుపు తెలుపు
Tools panel side టూల్స్ ప్యానెల్ వైపు
Add comment వ్యాఖ్యను జోడించు

Can't render this file because it contains an unexpected character in line 13 and column 16.

View File

@ -2252,3 +2252,4 @@ scroll speed Fast Hızlı
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Bu alanın yazı tipi “{c}” ({code}) karakterini çizemiyor, bu yüzden PdfCraft yerine ? gösteriyor. Değer kaydedilir ve diğer PDF görüntüleyiciler alanı ondan yeniden çizer.
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. PdfCraft'ın yazdığı yazı tipleri “{c}” ({code}) karakterini çizemiyor, bu yüzden her PDF görüntüleyicide ? olarak görünür. Metin kaydedilir.
Tools panel side Araçlar panelinin yeri
Add comment Yorum ekle

Can't render this file because it has a wrong number of fields in line 7.

View File

@ -2275,3 +2275,4 @@ scroll speed Fast Швидка
Black and white Чорно-білий
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйвер цього принтера не приймає налаштування двобічного друку від інших програм, тому діє його власне налаштування. Змініть його у вікні Властивості…
Tools panel side Бік панелі інструментів
Add comment Додати коментар

Can't render this file because it contains an unexpected character in line 6 and column 47.

View File

@ -2217,3 +2217,4 @@ scroll speed Fast 快
Black and white 黑白
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… 此打印机的驱动程序不接受其他程序的双面打印设置,因此使用其自身设置。更改位置:属性…
Tools panel side 工具面板位置
Add comment 添加注释

Can't render this file because it contains an unexpected character in line 9 and column 16.

View File

@ -2130,3 +2130,4 @@ scroll speed Fast 快
Black and white 黑白
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… 此印表機的驅動程式不接受其他程式的雙面列印設定,因此使用其自身設定。變更位置:屬性…
Tools panel side 工具面板位置
Add comment 新增註解

Can't render this file because it contains an unexpected character in line 9 and column 16.

View File

@ -151,6 +151,44 @@ fn a_selection_made_first_is_marked_when_a_tool_is_picked() {
assert!(h.state().views[0].selected_text().is_none(), "the selection is consumed");
}
#[test]
fn selected_text_shows_actions_and_underlines_without_changing_tools() {
let mut h = harness(|_| {});
h.state_mut().views[0].select_text(0, 4, 8);
h.run_steps(3);
h.get_by_label("Add comment");
h.get_by_label("Replace text");
h.get_by_label("Underline").click();
h.run_steps(3);
let c = comments(&h);
assert_eq!(c.len(), 1);
assert_eq!(c[0].subtype, "Underline");
assert!(h.state().views[0].selected_text().is_none());
assert_eq!(h.state().quick_tool, QuickTool::Select);
}
#[test]
fn selected_text_replace_action_opens_replacement_composer() {
let mut h = harness(|_| {});
h.state_mut().views[0].select_text(0, 4, 8);
h.run_steps(3);
h.get_by_label("Replace text").click();
h.run_steps(2);
h.get_by_label("Replacement text");
assert!(h.state().views[0].selected_text().is_none());
}
#[test]
fn selected_text_comment_action_opens_note_composer() {
let mut h = harness(|_| {});
h.state_mut().views[0].select_text(0, 4, 8);
h.run_steps(3);
h.get_by_label("Add comment").click();
h.run_steps(2);
assert!(matches!(h.state().views[0].comments.composer.as_ref().map(|c| &c.kind), Some(pdfcraft_ui_egui::comments::ComposerKind::Note)));
assert!(h.state().views[0].selected_text().is_none());
}
#[test]
fn shapes_and_ink_are_drawn_by_dragging() {
let mut h = harness(|app| app.set_option("quick", "square").unwrap());

View File

@ -1,5 +1,6 @@
# PdfCraft roadmap: milestones and what's next
> **Last reviewed:** 2026-10-12 · **Last updated:** 2026-10-12 · **Change:** minor (M2: short same-line redraws split before placement; estimates unchanged) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (M10, #1028: OCR reads pictures on pages that have text, on request; earlier: direct Organize overview and page actions; localized shortcut labels, #496; alpha gate added; convert-and-share re-judged with the cross-app rule → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-11 · **Last updated:** 2026-10-11 · **Change:** minor (M13/#971: bound per-page search match allocation; text cache byte budget and extraction warnings remain open) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-11 · **Change:** minor (#594 paragraph drags validated in the Linux test environment; localized shortcut labels, #496; alpha gate added; convert-and-share re-judged with the cross-app rule → alpha) · **Target:** Adobe Acrobat Pro (Acrobat DC, continuous track 26.002.21931, macOS)
@ -75,7 +76,7 @@ total matches the parity estimate.
|---|---|---|---|---|---|
| M0 | Skeleton: workspace, xtask gates, CI | 15–30 | 98% | 1–2 | GitHub workflow, `deny.toml` (licence audit of every dependency), parity checklist (826 features, `xtask parity`) done. Missing: remaining crate stubs, testkit/oracle crates |
| M1 | COS: filters, crypt, parser, xref, writer | 120–200 | 80% | 20–40 | Done:<br>- filters and crypt: every standard-security revision R2–R6 (RC4, AES-128/256), SASLprep, permissions, creating encryption;<br>- cos: parse and repair (including invalid xref object-number ranges), decoded-stream limits including unfiltered data, decrypt on load, re-encrypt on save, incremental and full writing.<br>Corpus: open/edit/save passes on 958 files, and all 7 password-protected files open.<br>Full saves now pack objects into compressed object streams. Fuzzing runs nightly (`xtask fuzz`). Missing: ≥ 250 tests, own image codecs |
| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings |
| M2 | Model, render, text | 200–350 | 15% | 130–230 | hayro bootstrap renderer (vendored patches); inspector predictor scratch is bounded by available input, and JPX sample rescaling handles 1–32 bits safely. Text extraction reaches word-F1 0.98 against pdftotext. Short same-line redraws split before placement rather than interleaving. Missing: model crate, fonts, DisplayList, renderer independent of hayro. Inspector page-label traversal and output are resource-bounded, with physical-number fallback warnings |
| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). |
| M4 | Engine, history, save, organize | 100–180 | 95% | 8–15 | Done:<br>- command registry (menus, shortcuts and palette all use it);<br>- undo/redo; incremental, atomic and encrypted saves;<br>- autosave and crash recovery;<br>- organize, combine, extract, split and insert-from-file, with identical fonts and images stored once;<br>- CLI `edit/combine/extract/split`.<br>Done since: Organize opens directly into the page overview, with checkbox selection and per-page rotate/delete controls; Combine files in its own tab (sortable, resizable columns; folders; early warnings; unlocking protected files), bookmark editing, page labels (Number pages), CLI `run`, Set Page Boxes, Crop tool, Duplicate pages, Ctrl+A / Cmd+A to select all pages in Organize, Replace pages, bookmarks from tagged headings. Missing: page transitions, recovery on the web |
| M3 | Viewer app (native + web) | 80–150 | 90% | 10–20 | Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel<br>Done since: fit visible, document title in the window; Linux middle-button scrolling; shared three-state theme preferences in the toolbar, View menu and control channel; numeric Linux portal events and idle wakeups completing #881, with native appearance inheritance retained (#446); late browser startup downloads preserve the current document and Save target (#171). Renderer-creation errors return to the existing OpenGL startup fallback; a real-GPU regression covers errors and device reuse. The underlying x86 DX12 shader compiler failure remains unresolved; see `windows-renderer-startup.md`. |
@ -139,6 +140,7 @@ M2 (renderer), M7 (content editing), M10 (OCR and Office), M11 (Preflight and st
| Date | Change | Summary |
|---|---|---|
| 2026-10-12 | minor | M2: short same-line redraws split before placement; estimates unchanged. |
| 2026-10-11 | minor | M13/#971: cap materialized text-search matches to the requested limit plus one continuation match. |
| 2026-10-11 | minor | M7: #594 ordinary paragraph drags validated in the Linux test environment with source-loss baseline failures, UI/engine regressions, native save/reopen and all eight CI gates. Estimates unchanged. |
| 2026-10-11 | minor | M4: direct Organize overview, checkbox selection and individual page actions. Estimates unchanged. |

View File

@ -1490,8 +1490,8 @@ milestone = "M3"
status = "shipped"
commands = []
tools = []
evidence = ["crates/ui-egui/tests/ui.rs::drag_selects_text_and_copy_returns_it", "crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_select_a_word_then_the_line_then_the_page", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_with_the_highlighter_mark_only_the_word", "crates/ui-egui/tests/ui_group/text_select.rs::shift_click_extends_the_selection_from_its_anchor"]
notes = "Drag to select; ⇧-click extends the selection to the click, keeping its anchor (same page only); with the Select tool, quick clicks select a word (two), the line (three) or all the text on the page (four). The markup and Redact tools mark a double-clicked word and stop there. Missing: selection across pages (dragging or ⇧-clicking onto another page), paragraph selection, and ⌘A across the whole document (it selects the current page)."
evidence = ["crates/ui-egui/tests/ui.rs::drag_selects_text_and_copy_returns_it", "crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_select_a_word_then_the_line_then_the_page", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_with_the_highlighter_mark_only_the_word", "crates/ui-egui/tests/ui_group/text_select.rs::shift_click_extends_the_selection_from_its_anchor", "crates/ui-egui/tests/comments.rs::selected_text_shows_actions_and_underlines_without_changing_tools", "crates/ui-egui/tests/comments.rs::selected_text_replace_action_opens_replacement_composer", "crates/ui-egui/tests/comments.rs::selected_text_comment_action_opens_note_composer"]
notes = "Drag to select; ⇧-click extends the selection to the click, keeping its anchor (same page only); with the Select tool, quick clicks select a word (two), the line (three) or all the text on the page (four). A floating action bar offers comment, highlight, underline, strikethrough, replace text and copy after selection. The markup and Redact tools mark a double-clicked word and stop there. Missing: selection across pages (dragging or ⇧-clicking onto another page), paragraph selection, and ⌘A across the whole document (it selects the current page). Acrobat's other selection context actions such as bookmark, link and export selection remain outside this bar."
[[feature]]
id = "view.column-select"

2
vendor/README.md vendored

File diff suppressed because one or more lines are too long

View File

@ -142,14 +142,14 @@ impl XConnection {
dpi_override
},
EnvVarDPI::NotSet => {
if let Some(dpi) = self.get_xft_dpi() {
dpi / 96.
} else {
calc_dpi_factor(
(crtc.width.into(), crtc.height.into()),
(output_info.mm_width as _, output_info.mm_height as _),
)
}
let screen = self.default_root();
default_dpi_factor(
self.get_xft_dpi(),
(screen.width_in_pixels.into(), screen.height_in_pixels.into()),
(screen.width_in_millimeters.into(), screen.height_in_millimeters.into()),
(crtc.width.into(), crtc.height.into()),
(output_info.mm_width as _, output_info.mm_height as _),
)
},
};
@ -184,3 +184,71 @@ impl XConnection {
Ok(self.xcb_connection().randr_get_crtc_info(crtc_id, x11rb::CURRENT_TIME)?.reply()?.mode)
}
}
// PdfCraft patch: without Xft DPI, use the X server's configured screen DPI before
// the output's physical density. Xorg can deliberately run a dense panel at 96 DPI;
// using its EDID dimensions instead makes only winit applications appear zoomed.
// Keep configured HiDPI screens and the explicit `randr` override working.
fn default_dpi_factor(
xft_dpi: Option<f64>,
screen_pixels: (u32, u32),
screen_mm: (u64, u64),
output_pixels: (u32, u32),
output_mm: (u64, u64),
) -> f64 {
if let Some(dpi) = xft_dpi {
return dpi / 96.;
}
if screen_pixels.0 != 0 && screen_pixels.1 != 0 && screen_mm.0 != 0 && screen_mm.1 != 0 {
calc_dpi_factor(screen_pixels, screen_mm)
} else {
calc_dpi_factor(output_pixels, output_mm)
}
}
#[cfg(test)]
mod tests {
use super::{calc_dpi_factor, default_dpi_factor};
const PIXELS: (u32, u32) = (1920, 1080);
const SCREEN_96: (u64, u64) = (508, 285);
const SCREEN_144: (u64, u64) = (339, 190);
const SCREEN_192: (u64, u64) = (254, 143);
const PANEL: (u64, u64) = (381, 214);
#[test]
fn server_dpi_wins_over_the_panels_physical_density() {
assert_eq!(default_dpi_factor(None, PIXELS, SCREEN_96, PIXELS, PANEL), 1.0);
assert_eq!(default_dpi_factor(None, PIXELS, SCREEN_144, PIXELS, PANEL), 1.5);
assert_eq!(default_dpi_factor(None, PIXELS, SCREEN_192, PIXELS, PANEL), 2.0);
}
#[test]
fn xft_dpi_still_has_priority() {
for dpi in [96.0, 120.0, 144.0, 192.0] {
assert_eq!(
default_dpi_factor(Some(dpi), PIXELS, SCREEN_192, PIXELS, PANEL),
dpi / 96.0,
);
}
}
#[test]
fn missing_screen_dimensions_keep_the_randr_fallback() {
let physical_scale = calc_dpi_factor(PIXELS, PANEL);
assert!(physical_scale > 1.0);
for screen_mm in [(0, 285), (508, 0), (0, 0)] {
assert_eq!(default_dpi_factor(None, PIXELS, screen_mm, PIXELS, PANEL), physical_scale);
}
for screen_pixels in [(0, 1080), (1920, 0), (0, 0)] {
assert_eq!(default_dpi_factor(None, screen_pixels, SCREEN_96, PIXELS, PANEL), physical_scale);
}
assert_eq!(default_dpi_factor(None, PIXELS, (0, 0), PIXELS, (0, 0)), 1.0);
}
#[test]
fn explicit_randr_calculation_still_uses_output_dimensions() {
assert_eq!(calc_dpi_factor(PIXELS, PANEL), 4.0 / 3.0);
assert_eq!(calc_dpi_factor(PIXELS, SCREEN_192), 2.0);
}
}