Implement native text accents for unmodified LaTeX jobs

This commit is contained in:
gloamxun committed 2026-11-20 16:15:30 +08:00
1 parent ca60c66a17
commit 4eeb5686b8
16 files changed
+269 -18

No files matched your search

@@ -128,6 +128,7 @@ pub(super) enum BreakNode {
post_break: Option<Widths>,
replacement_count: u8,
},
AccentKern(i32),
}
impl BreakNode {
@@ -146,6 +147,7 @@ impl BreakNode {
TextNode::Glue(glue)
| TextNode::NamedGlue(glue, _)
| TextNode::Leaders(LeaderGlue { glue, .. }) => Self::Glue(*glue),
TextNode::AccentKern(width) => Self::AccentKern(*width),
TextNode::Kern { width, explicit } => Self::Kern {
width: *width,
explicit: *explicit,
@@ -178,7 +180,9 @@ impl BreakNode {
natural,
..Default::default()
},
Self::Kern { width, .. } | Self::MathBoundary { width, .. } => Widths {
Self::Kern { width, .. }
| Self::AccentKern(width)
| Self::MathBoundary { width, .. } => Widths {
natural: i64::from(width),
..Default::default()
},