Execute explicit XeTeX glyph nodes across native layout and export

This commit is contained in:
gloamxun committed 2026-11-26 11:54:39 +08:00
1 parent a0922d0105
commit b88283f493
17 files changed
+185 -43

No files matched your search

@@ -84,6 +84,8 @@ pub enum TextNode {
Direction(DirectionBoundary),
FontSpace(Glue, FontId, TokenOrigin),
SpaceAdjustment(i32),
/// A native XeTeX glyph node carries no text for shaping or hyphenation.
ExplicitOpenTypeGlyph(Arc<OpenTypeRun>),
}
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct NativeParagraph {
@@ -574,7 +576,7 @@ fn width(n: &TextNode) -> i64 {
TextNode::Glyph { glyph, .. } | TextNode::Box(glyph) | TextNode::MathChar(glyph) => {
glyph.width
}
TextNode::OpenType(run) => run.width,
TextNode::OpenType(run) | TextNode::ExplicitOpenTypeGlyph(run) => run.width,
TextNode::Glue(g) | TextNode::FontSpace(g, _, _)
| TextNode::NamedGlue(g, _)
| TextNode::Leaders(LeaderGlue { glue: g, .. }) => g.width as i64,
@@ -1238,6 +1240,7 @@ fn pre_display_line_size(
TextNode::Glyph { .. }
| TextNode::Box(_)
| TextNode::OpenType(_)
| TextNode::ExplicitOpenTypeGlyph(_)
| TextNode::MathChar(_)
| TextNode::Indent(_)
| TextNode::Rule(_)