Reuse verified Type 1 glyph and PDF subset output across edits

This commit is contained in:
gloamxun committed 2026-11-28 23:03:13 +08:00
1 parent 6939ff71ff
commit 11c8ad1eaa
12 files changed
+236 -11

No files matched your search

+6
View File
@@ -235,6 +235,8 @@ pub struct CompiledDocument {
pub line_break_work: texrra_tex_core::execution::LineBreakWork,
/// Work converting shipped boxes to local drawing lists before resolving PDF resources.
pub shipout_layout_work: ShipoutLayoutWork,
/// Type 1 glyph and PDF subset work in this revision.
pub type1_font_work: texrra_tex_core::native_font::Type1FontWork,
/// Original measurements with actual resolved font programs.
pub pages: Vec<DisplayList>,
/// Revision-local measured paint and source versions. `unmapped` explicitly
@@ -1123,6 +1125,8 @@ impl CompileJob {
notify(&request, revision, CompileStage::Executed, &cancellation)?;
evidence.phase = AttemptPhase::Layout;
let e = &execution.execution;
let font_cache = &self.compiler.font_cache;
let type1_before = font_cache.type1_work();
let prior_layout = (entry_checkpoint_work.reused_steps > 0)
.then(|| self.compiler.latest())
.flatten();
@@ -1257,6 +1261,7 @@ impl CompileJob {
} else if request.target == Target::Shipouts {
let mut options = e.state.pdf_final_options();
options.xdv_glyph_names = xdv_glyph_names.as_ref();
options.font_cache = Some(font_cache);
let document = texrra_tex_core::pdf::shipout_lists_to_native_pdf_document(
&pages,
options,
@@ -1329,6 +1334,7 @@ impl CompileJob {
entry_checkpoint_work,
line_break_work,
shipout_layout_work,
type1_font_work: font_cache.type1_work().since(type1_before),
execution,
pages,
source_map,