Implement caching when performing outline conversion

This commit is contained in:
be5invis 2021-04-17 14:38:29 -07:00
parent b16dfb91db
commit e28ce0fd68
6 changed files with 82 additions and 14 deletions

View file

@ -9,7 +9,7 @@ const { buildOtl } = require("../otl/index");
const { assignFontNames } = require("../meta/naming");
const { copyFontMetrics } = require("../meta/aesthetics");
module.exports = function (para) {
module.exports = async function (argv, para, ptCache) {
const otd = EmptyFont();
const gs = buildGlyphs(para);
@ -29,7 +29,7 @@ module.exports = function (para) {
}
}
const finalGs = finalizeFont(para, gs.glyphStore, excludeChars, otd);
const finalGs = finalizeFont(para, gs.glyphStore, excludeChars, otd, ptCache);
const font = convertOtd(otd, finalGs);
return { font, glyphStore: finalGs };
};