mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
Chasing individual wide glyphs does not converge. Each review pass found another one the list had missed — `W`, then CJK and emoji, then the `ae` ligature, which passes the Latin range check and took the lowercase 0.6 factor while rendering about 1.05 em. Every miss crops the card silently, because an under-estimate skips both the wrap and the textLength clamp. The model is now inverted: narrow characters are enumerated and everything else is assumed wide (1.15 em). Accented Latin, ligatures, Cyrillic, Greek, CJK, kana, hangul and emoji all take the wide default, so the estimate can only ever run high — and running high costs an early line break nobody sees. There is no list left to miss an entry from. The real guard is a new test that renders each sample through sharp and asserts the estimate never falls below the measured ink width. It covers Latin, ligatures, CJK, hangul, Cyrillic, symbols and accents, and would have caught every one of the preceding rounds at once. Measured locally: 34 `W` renders 1669px against a 2033px estimate, 34 `ae` 1601px, 28 `CJK` 1459px — every case over-estimated, including both widths reported in review from a different font environment. 190 tests passing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>