Persist language-specific e-TeX hyphenation codes

This commit is contained in:
gloamxun committed 2026-11-28 12:14:12 +08:00
1 parent 11fd66713b
commit b472f66d04
10 files changed
+198 -45

No files matched your search

@@ -1293,6 +1293,7 @@ impl Default for State {
| Parameter::Ignoreprimitiveerror
| Parameter::TeXXeTstate
| Parameter::Lastlinefit
| Parameter::Savinghyphcodes
) || Parameter::XETEX.contains(p) {
continue;
}
@@ -1346,6 +1347,7 @@ impl State {
+ self.sfcodes.len()
+ self.xe_char_classes.len()
+ self.case_codes.len()
+ self.hyphenation.saved_code_count()
+ self.mathfonts.len();
c.usage.state.save_entries = self.groups.iter().map(|g| g.saved.len()).sum();
c.usage.state.font_instances = self.fonts.fonts().len() - 1;
@@ -1545,6 +1547,7 @@ impl State {
Parameter::Savingvdiscards,
Parameter::Ignoreprimitiveerror,
Parameter::Lastlinefit,
Parameter::Savinghyphcodes,
] {
self.commands.insert(
CommandName::Control(parameter.name()),
@@ -1795,9 +1798,8 @@ impl State {
}
}
pub(super) fn restore_legacy_last_line_fit(&mut self) {
pub(super) fn restore_legacy_etex_parameter(&mut self, parameter: Parameter) {
if self.profile == Profile::EtexBootstrap {
let parameter = Parameter::Lastlinefit;
self.commands
.entry(CommandName::Control(parameter.name()))
.or_insert(Meaning::Parameter(parameter));