Normalize native XeTeX physical input before tokenization

This commit is contained in:
gloamxun committed 2026-11-26 13:02:38 +08:00
1 parent 048478c346
commit 76df2d6832
10 files changed
+214 -63

No files matched your search

@@ -130,6 +130,7 @@ pub enum Parameter {
XeTeXinterwordspaceshaping,
XeTeXlinebreakskip,
XeTeXlinebreakpenalty,
XeTeXinputnormalization,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
pub enum ParameterValue {
@@ -162,7 +163,7 @@ impl Parameter {
)
}
pub(super) const XETEX: [Self; 10] = [
pub(super) const XETEX: [Self; 11] = [
Self::XeTeXuseglyphmetrics,
Self::XeTeXdashbreakstate,
Self::Suppressfontnotfounderror,
@@ -173,6 +174,7 @@ impl Parameter {
Self::XeTeXinterwordspaceshaping,
Self::XeTeXlinebreakskip,
Self::XeTeXlinebreakpenalty,
Self::XeTeXinputnormalization,
];
pub const ALL: &'static [Self] = &[
@@ -301,6 +303,7 @@ impl Parameter {
Self::XeTeXinterwordspaceshaping,
Self::XeTeXlinebreakskip,
Self::XeTeXlinebreakpenalty,
Self::XeTeXinputnormalization,
];
pub fn name(self) -> String {
match self {
@@ -314,6 +317,7 @@ impl Parameter {
Self::XeTeXinterwordspaceshaping => "XeTeXinterwordspaceshaping".into(),
Self::XeTeXlinebreakskip => "XeTeXlinebreakskip".into(),
Self::XeTeXlinebreakpenalty => "XeTeXlinebreakpenalty".into(),
Self::XeTeXinputnormalization => "XeTeXinputnormalization".into(),
_ => format!("{self:?}").to_ascii_lowercase(),
}
}