mirror of
https://github.com/2234839/web-font.git
synced 2026-09-12 03:35:44 +08:00
对栈的所有读取仅需栈顶:HSTEM 用 stackLen 算 stemCount,CALLSUBR 用 lastVal 取调用编号、用 lastStart 截断回栈顶 operand 起始处重写。其余 operand 的值/位置从不被读取,故 stackStart/stackVal 两数组可标量化为 stackLen+lastVal+lastStart 三标量(与 collectSubrRefs 同构),消除每个 operand 的 push 装箱 + length=0 重置。 A/B:otf 思源/白狐 × ttf/woff2 共 4 产物逐字节完全一致。 性能:subsetOTF 思源 min 0.266→0.235ms(-11.6%)。 基准测试全通过,SSIM 与基线一致。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>