Refactor: Create a separate class for glyph store

This commit is contained in:
be5invis 2020-08-09 18:11:36 -07:00
parent 02e6d041be
commit 4d20f8e655
25 changed files with 482 additions and 360 deletions

View file

@ -15,7 +15,7 @@ module.exports = function (para) {
assignFontNames(para, gs.metrics, font);
setFontMetrics(para, gs.metrics, font);
const otl = buildOtl(para, gs.glyphs, gs.glyphList, gs.unicodeGlyphs);
const otl = buildOtl(para, gs.glyphStore);
font.GSUB = otl.GSUB;
font.GPOS = otl.GPOS;
font.GDEF = otl.GDEF;
@ -28,6 +28,6 @@ module.exports = function (para) {
}
}
finalizeFont(para, [...gs.glyphList], excludeChars, font);
return font;
finalizeFont(para, gs.glyphStore, excludeChars, font);
return { font, glyphStore: gs.glyphStore };
};