mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 13:33:51 +00:00
Saving a .ai file resolves the font of every run of type twice: once for its font record and once to check that the font comes back as itself. Each resolution looks the face up, reads its axes and name table, and scans the loaded faces by PostScript name, so a document with tens of thousands of runs in a few fonts repeated the same lookups for every run. The text document now keeps what each style's font fields (family, style, version and Variable Font settings, each setting by the bits of its value) resolve to for the whole save, and reuses it while the font database's generation is unchanged. A font added or loaded during the save resolves it again. The font set is still searched and filled as before, so its order, indices and rollback are unchanged. The output is unchanged. - Tests: a save resolves as many fonts for one row of type as for four; the program, header, warnings and private data are the same as with every run's font resolved again (many fonts, threaded type, envelopes of type, and type taken back when an envelope is written as its art); each resolved record and check equals the uncached one for static and variable fonts, settings outside the axis range, not a number, +0 and -0, and a missing family, and a value resolved before the font database changed is resolved again. An ignored test times the save of 10,000 point type objects in three runs over four fonts.