Embed fonts and add PDF link annotations

This commit is contained in:
gloamxun committed 2026-10-19 21:18:58 +08:00
1 parent 2856506d65
commit 3b270d749d
6 files changed
+247 -12

No files matched your search

+20
View File
@@ -1550,3 +1550,23 @@ After text.
"caption footnote should be painted on the figure page"
);
}
#[test]
fn url_text_creates_a_pdf_link_annotation() {
let source = r"\documentclass{article}
\begin{document}
Visit \url{https://example.com/docs/page} for details.
\end{document}";
let pdf = CompilerSession::default()
.compile(source, "url-link.tex")
.expect("URL PDF");
let text = String::from_utf8_lossy(&pdf);
assert!(
text.contains("/Subtype/Link"),
"URL text should produce a link annotation"
);
assert!(
text.contains("https://example.com/docs/page"),
"annotation should carry the full URL"
);
}