mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-06 05:53:08 -05:00
FontDb added the bundled fonts to the font catalog with add_bytes on the first call of FontDb::catalog, which copied every bundled font file into the heap (3,381,864 bytes for the nine fonts in assets/fonts, more with craft-fonts embedded). The app reads the catalog at startup, so every session held those copies. FontDb::new now registers them with Catalog::add_static (craft-libs #4888, in the pinned rev), which reads the faces from the binary's own bytes, so the deferral through a Once is gone. The test checks that the bundled faces are in the catalog as soon as the database is made, and that Catalog::face_data returns the embedded bytes themselves (same pointer), so a copy fails it.