mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-30 05:17:25 -06:00
Finding 59: enumerate_faces took a collection's member count straight from its header (a TTC can list one table directory millions of times) and font_faces read every fvar named instance (up to 65535, with a linear style dedupe and a name-table lookup each). Every entry became a FontFace kept for the session, and add_fonts then checked each new face against every face in the database. Now a file yields at most 256 faces (MAX_FILE_FACES; user fonts ask for one more so they can still be refused as "more than 256 faces"), named instances are read to the same cap, a face with the family and style of an earlier one in the file is skipped (repeated collection offsets), and add_fonts dedupes against an indexed set. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>