Iosevka/font-src/gen/otd-conv/index.js
be5invis 7c78329244 * Replace autoRef with semantic inclusion for more stable results.
* Move files around to make repository organized better.
2020-10-17 15:45:00 -07:00

22 lines
843 B
JavaScript

const Metadata = require("./metadata");
const convertGlyphs = require("./glyphs");
const convertName = require("./name");
const { convertGsub, convertGpos, convertGdef } = require("./layout");
module.exports = function (otdRestFont, gs) {
const head = Metadata.convertHead(otdRestFont.head);
const hhea = Metadata.convertHhea(otdRestFont.hhea);
const post = Metadata.convertPost(otdRestFont.post);
const maxp = Metadata.convertMaxp(otdRestFont.maxp);
const os2 = Metadata.convertOs2(otdRestFont.OS_2);
const name = convertName(otdRestFont.name);
const { glyphs, cmap } = convertGlyphs(gs);
const gsub = convertGsub(otdRestFont.GSUB, glyphs);
const gpos = convertGpos(otdRestFont.GPOS, glyphs);
const gdef = convertGdef(otdRestFont.GDEF, glyphs);
return { glyphs, head, hhea, post, maxp, os2, name, cmap, gsub, gpos, gdef };
};