mirror of
https://github.com/2234839/web-font.git
synced 2026-09-17 14:45:55 +08:00
subset 模式下 glyf.read(表顺序在 hmtx 之前)已构建 subsetGids, resolveGlyf 也只访问 subsetGids 对应位置。原实现全量解析 numOfLongHorMetrics 项(思源 30888)对小子集是纯浪费。改为只读 subsetGids 需要的项, 其余位置保持 0(不被访问)。 实测 hmtx.read 0.21→0.032ms(6.5×),基准 SSIM/ink/字节全无回归。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>