[Parity][hud][S3][F] 字体加载和解析的静默兜底,tbl 字段读错 #650
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源审计项:
hud#17— [S3][F] 17. 字体加载和解析的静默兜底,tbl 字段读错src/client/ui/font.ts:205-229(metrics.json 返回非 200 就直接 return;图片onerror也 resolve;catch 后loaded = false)、:484-499(没有位图字形时整段改用浏览器字体)、:98-107(tblBytes[10] || 14、tblBytes[11] || 16、宽|| 6、高|| lineHeight)、:142-163(FONT_PX_SIZE/FONT_BASELINE_OFFSET是手调数字)、:171-176(颜色解析失败时回退成白色)D2FontStrc偏移 0x0A 是nHeight,0x0B 是nWidth;D2CharStrc偏移 0x03 是nWidth,0x04 是nHeight,0x08 是 WORD 类型的nImageIndex(V-srcD2Win/include/D2WinFont.h:14-34)。行距 = 行距常量(Latin 16)× nHeight / 10(V-srcD2WinFont.cpp:796、:638)。nWidth,却被当作 capHeight;||默认值会掩盖损坏的数据;基线和字号常量来源不明(?)。D2FontStrc解析字段;行距和基线按 D2WinFont 的常量和 nHeight/10 规则计算。