Register virtual fonts in native PDF shipout order

This commit is contained in:
gloamxun committed 2026-11-21 09:18:03 +08:00
1 parent b008c0693a
commit 614f09aa9b
11 files changed
+708 -139

No files matched your search

@@ -7,6 +7,7 @@ pub(super) struct VirtualFont {
pub design_size: i64,
pub default_font: Option<u32>,
pub local_fonts: BTreeMap<u32, LocalFont>,
pub local_order: Vec<u32>,
pub packets: BTreeMap<u8, Packet>,
}
@@ -121,6 +122,7 @@ impl VirtualFont {
design_size,
default_font: None,
local_fonts: BTreeMap::new(),
local_order: Vec::new(),
packets: BTreeMap::new(),
};
let mut opcode = input.byte()?;
@@ -131,6 +133,7 @@ impl VirtualFont {
return Err("duplicate local font in VF".into());
}
vf.default_font.get_or_insert(id);
vf.local_order.push(id);
opcode = input.byte()?;
}
while opcode <= 242 {