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

+23
View File
@@ -2175,6 +2175,29 @@ PDF,恢复实际 PFB 并反转斜切时复用 1277 步,只替换第二页。
全量编译一致。incremental-receipt.json 的 SHA-256 为
bbc0991b0316e6d76aa58649ec873525f5544ab530d93fe491fc6e16bd00a27d。
### XeTeX 上下文词间距与跨词造型
`\XeTeXinterwordspaceshaping` 在扫描原生词时测量实际字体的
上下文宽度,第一级把差量写成可在断行时舍弃的独立 kern。
第二级在出页时按实际胶宽重新组合字形,保留已定行宽、词级
ActualText 和来源。合并的胶与剩余胶分别按原版规则舍入。
同一准备后的布局供字形、延迟写出和 specials 使用。
[扫描期上下文宽度](https://github.com/TeX-Live/texlive-source/blob/279984fab6eaed8d17e02882f2668ab5caac0f27/texk/web2c/xetexdir/xetex.web#L24584-L24654)
[出页合并与节点重连](https://github.com/TeX-Live/texlive-source/blob/279984fab6eaed8d17e02882f2668ab5caac0f27/texk/web2c/xetexdir/xetex.web#L14713-L14833)
[跨词字形的宽度分配](https://github.com/TeX-Live/texlive-source/blob/279984fab6eaed8d17e02882f2668ab5caac0f27/texk/web2c/xetexdir/XeTeX_ext.c#L1938-L1987)
同源对照 19 页、100 个字形的编号、字号、顺序和坐标全部
一致。验证跨空格连字、阿拉伯语、断行、显式胶、盒复制、出页时
切换、1 sp 的舍入、ActualText、specials 位置和延迟写出。CFF
探针使用单独冻结的 GSUB、GPOS 特性。原样 ACL 复用同一 schema71、
真实字体和实际辅助文件,PDF 与生成文件和上一版逐字节一致。
schema73 可重载赋值和别名。12 项 XeTeX 定向测试通过。
三次跨文件切换至 1、2、0 时各复用 66 步、重放 2 次调用,只刷新
第二页,PDF、SVG 和来源映射均与独立全量一致。回执
`target/p3-xetex-interword/receipt.json` 的 SHA-256 为
`009cbd22cb56042362e6c1baae2db3dc50a3b28a1857ce5aae915adb431461a8`。
### XeTeX 词级 PDF ActualText
`\XeTeXgenerateactualtext` 随真实整数赋值和分组生效。新建原生词