mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-16 23:44:44 +00:00
System fallback read and parsed every cataloged font file (<40 MB) again for each distinct character no loaded font covers; only that character's miss was remembered. Text in a script no installed font covers (Tangut, CJK Ext G, ...) froze layout for seconds to minutes. Each file is now read once, when a fallback search first reaches it, and its coverage is kept as sorted code point ranges; later searches answer from the ranges and only read a file that maps the character (to load it). Rescans keep the ranges of files still installed. Preferred fallback families are tried once each, the miss set is capped, and indexing a damaged file is bounded (faces, mappings, ranges). Search order and the fonts chosen are unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>