Implement XeTeX contextual interword spacing and shipout shaping

This commit is contained in:
gloamxun committed 2026-11-26 09:23:45 +08:00
1 parent 7e5428ec35
commit 4a77540e46
23 files changed
+491 -42

No files matched your search

@@ -127,6 +127,7 @@ pub enum Parameter {
XeTeXprotrudechars,
XeTeXhyphenatablelength,
XeTeXgenerateactualtext,
XeTeXinterwordspaceshaping,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
pub enum ParameterValue {
@@ -159,7 +160,7 @@ impl Parameter {
)
}
pub(super) const XETEX: [Self; 7] = [
pub(super) const XETEX: [Self; 8] = [
Self::XeTeXuseglyphmetrics,
Self::XeTeXdashbreakstate,
Self::Suppressfontnotfounderror,
@@ -167,6 +168,7 @@ impl Parameter {
Self::XeTeXprotrudechars,
Self::XeTeXhyphenatablelength,
Self::XeTeXgenerateactualtext,
Self::XeTeXinterwordspaceshaping,
];
pub const ALL: &'static [Self] = &[
@@ -292,6 +294,7 @@ impl Parameter {
Self::XeTeXprotrudechars,
Self::XeTeXhyphenatablelength,
Self::XeTeXgenerateactualtext,
Self::XeTeXinterwordspaceshaping,
];
pub fn name(self) -> String {
match self {
@@ -302,6 +305,7 @@ impl Parameter {
Self::XeTeXprotrudechars => "XeTeXprotrudechars".into(),
Self::XeTeXhyphenatablelength => "XeTeXhyphenatablelength".into(),
Self::XeTeXgenerateactualtext => "XeTeXgenerateactualtext".into(),
Self::XeTeXinterwordspaceshaping => "XeTeXinterwordspaceshaping".into(),
_ => format!("{self:?}").to_ascii_lowercase(),
}
}