Promote verified native PDF and box capacity support

This commit is contained in:
gloamxun committed 2026-11-19 14:39:39 +08:00
1 parent 3706afa483
commit 72ed779749
31 files changed
+1042 -78

No files matched your search

@@ -109,6 +109,7 @@ pub enum Primitive {
Pdfendlink,
Pdfdest,
Pdfcatalog,
Pdfinfo,
Pdfsetmatrix,
Pdfrestore,
Pdfglyphtounicode,
@@ -597,6 +598,7 @@ pub struct State {
pub(super) pdf_file_options: Option<crate::pdf_device::PdfFileOptions>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub(super) pdf_catalog: Option<Box<crate::pdf_device::catalog::PdfCatalog>>,
pub(super) pdf_info: Vec<u8>,
pub(super) glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap,
pub(super) hyphenation: super::hyphenation::HyphenationData,
}
@@ -638,6 +640,7 @@ impl Default for State {
output_mode_set: None,
pdf_file_options: None,
pdf_catalog: None,
pdf_info: Vec::new(),
glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap::default(),
hyphenation: super::hyphenation::HyphenationData::default(),
};
@@ -859,6 +862,7 @@ impl Default for State {
("pdfendlink", Pdfendlink),
("pdfdest", Pdfdest),
("pdfcatalog", Pdfcatalog),
("pdfinfo", Pdfinfo),
("pdfsetmatrix", Pdfsetmatrix),
("pdfrestore", Pdfrestore),
("pdfglyphtounicode", Pdfglyphtounicode),
@@ -1245,6 +1249,7 @@ impl State {
self.output_mode_set = None;
self.pdf_file_options = None;
self.pdf_catalog = None;
self.pdf_info.clear();
self
}
pub fn is_initex(&self) -> bool {
@@ -1258,6 +1263,12 @@ impl State {
generate_unicode: self.parameter(Parameter::Pdfgentounicode).width(),
glyph_unicode: &self.glyph_unicode,
catalog: self.pdf_catalog.as_deref(),
info: crate::pdf_device::PdfInfo {
entries: &self.pdf_info,
date: (self.parameter(Parameter::Pdfinfoomitdate).width() == 0)
.then_some(self.pdf_creation_date.as_deref())
.flatten(),
},
}
}
/// Job-wide decoding choice; it is not a scoped TeX assignment.