Implement XeTeX OpenType letterspacing and contextual line widths

This commit is contained in:
gloamxun committed 2026-11-26 09:59:27 +08:00
1 parent 4a77540e46
commit cc0246016d
10 files changed
+223 -97

No files matched your search

@@ -131,6 +131,10 @@ impl Executor {
};
let italic = match paragraph.nodes.last() {
Some(TextNode::Glyph { glyph, .. } | TextNode::MathChar(glyph)) => glyph.italic,
Some(TextNode::OpenType(run)) if self.state.input_profile() == InputProfile::XeTeX => {
run.glyphs.last().map_or(Ok(0), |glyph| run.font.italic_correction(glyph.id))
.map_err(|error| self.error(error, self.current))?
}
_ => return Ok(()),
};
self.reads.insert(Dependency::FontResources);