Query actual XeTeX glyph bounds and names in native jobs

This commit is contained in:
gloamxun committed 2026-11-26 12:11:40 +08:00
1 parent b88283f493
commit fc6d704edf
8 files changed
+109 -6

No files matched your search

@@ -1103,6 +1103,10 @@ impl Executor {
}
Pdftexrevision => self.print_tokens(self.state.pdftex_revision(), token)?,
XeTeXrevision => self.print_tokens(Self::XETEX_REVISION, token)?,
XeTeXglyphname => {
let name = self.xetex_glyph_name(files)?;
self.print_tokens(&name, token)?;
}
Etexrevision => self.print_tokens(".6", token)?,
Csname => {
let name = self.csname(files)?;
@@ -1285,7 +1289,7 @@ impl Executor {
RegisterValue::Dimension(self.paragraph_shape_dimension(p, files)?).text(false)
}
Meaning::Primitive(
p @ (Fontdimen | Fontcharwd | Fontcharht | Fontchardp | Fontcharic),
p @ (Fontdimen | Fontcharwd | Fontcharht | Fontchardp | Fontcharic | XeTeXglyphbounds),
) => RegisterValue::Dimension(self.font_dimension(p, files)?).text(false),
_ => self.internal_integer_from(next, files)?.to_string(),
};
@@ -2337,7 +2341,8 @@ impl Executor {
| Primitive::Fontcharwd
| Primitive::Fontcharht
| Primitive::Fontchardp
| Primitive::Fontcharic),
| Primitive::Fontcharic
| Primitive::XeTeXglyphbounds),
) => self.font_dimension(p, files),
Meaning::Primitive(p) if p.page_dimension().is_some() => self.page_dimension_value(p),
Meaning::Primitive(Primitive::Interactionmode) => Ok(self.interaction_mode_value()),
@@ -3255,6 +3260,8 @@ impl Executor {
Primitive::XeTeXpdffile => "XeTeXpdffile".into(),
Primitive::XeTeXpicfile => "XeTeXpicfile".into(),
Primitive::XeTeXglyph => "XeTeXglyph".into(),
Primitive::XeTeXglyphbounds => "XeTeXglyphbounds".into(),
Primitive::XeTeXglyphname => "XeTeXglyphname".into(),
Primitive::XeTeXinputencoding => "XeTeXinputencoding".into(),
Primitive::XeTeXdefaultencoding => "XeTeXdefaultencoding".into(),
Primitive::XeTeXcharclass => "XeTeXcharclass".into(),