mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 03:06:11 +00:00
* font-catalog: hand fontique only bounded font-store files fontique 0.11 imports a collection by registering the whole file once for each face in it, scanning every face again each time and rebuilding the family's font list, so a downloaded collection whose header declares many faces costs far more than its size. The store is now walked here (bounded depth and file count, no symbolic links) and collections that declare more than 64 faces are left to the catalog's own scan, which reads each face once. * font-catalog: load font-store files one at a time and keep fontique's walk fontique 0.11 re-adds every font gathered in one load_fonts_from_paths call to its family for each face it registers, so handing it the whole store at once repeats the store's fonts quadratically in the file count (126,230 family entries for 2,084 faces on a 400-file test store, 4 s; one call per file gives the same families, fonts, order and default fonts with 2,084 entries in 90 ms). The store walk now matches what fontique did with the folder before: links are followed (to regular files and folders, each folder once), depth 16, read_dir order, with a 200,000-entry budget like the catalog's scan. Pipes, devices and dangling links are skipped.