Caching improvement: now caching works across families
This commit is contained in:
parent
de458c9fce
commit
04a6a29238
7 changed files with 122 additions and 34 deletions
|
@ -27,10 +27,13 @@ exports.buildFont = async function buildFont(argv, para) {
|
|||
}
|
||||
}
|
||||
|
||||
const cache = await Caching.load(argv);
|
||||
// Finalize (like geometry conversion)
|
||||
const cache = await Caching.load(argv.iCache, argv.menu.version, argv.cacheFreshAgeKey);
|
||||
const finalGs = finalizeFont(cache, para, gs.glyphStore, excludeChars, otl);
|
||||
await Caching.save(argv, cache);
|
||||
if (cache.isUpdated()) {
|
||||
await Caching.save(argv.oCache, argv.menu.version, cache, true);
|
||||
}
|
||||
|
||||
const font = convertOtd(baseFont, otl, finalGs);
|
||||
return { font, glyphStore: finalGs };
|
||||
return { font, glyphStore: finalGs, cacheUpdated: cache.isUpdated() };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue