Resolve FitR destinations using shipped box geometry

This commit is contained in:
gloamxun committed 2026-11-21 05:18:07 +08:00
1 parent 22154b53a6
commit 003d5d8726
8 files changed
+123 -40

No files matched your search

+3 -2
View File
@@ -141,7 +141,7 @@ fn local_structure_action_references_the_shipped_structure_and_later_page() {
\shipout\hbox{\pdfstartlink goto struct name{anchor} name{anchor}
\vrule width10pt height6pt \pdfendlink}
\shipout\hbox{\pdfdest name{anchor} xyz
\pdfdest struct \count11 name{anchor} fit \vrule width10pt height6pt}
\pdfdest struct \count11 name{anchor} fitr width4pt height3pt depth2pt \vrule width10pt height6pt}
\end";
let doc = compile(&root, source, true);
let catalog = doc.catalog().unwrap();
@@ -177,6 +177,7 @@ fn local_structure_action_references_the_shipped_structure_and_later_page() {
.as_reference()
.unwrap()
);
assert_eq!(destination[1].as_name().unwrap(), b"Fit");
assert_eq!(destination.len(), 6);
assert_eq!(destination[1].as_name().unwrap(), b"FitR");
fs::remove_dir_all(root).unwrap();
}