lib-font
Version:
A JS based OpenType font inspector
23 lines (20 loc) • 587 B
JavaScript
import { SimpleTable } from "../../simple-table.js";
import lazy from "../../../../lazy.js";
/**
* The OpenType `prep` table.
*
* See https://docs.microsoft.com/en-us/typography/opentype/spec/prep
*/
class prep extends SimpleTable {
constructor(dict, dataview) {
const { p } = super(dict, dataview);
//
// The actual data is n instructions, where n is the number of
// uint8 items that fit in the size of the table... so, table.length
//
lazy(this, `instructions`, () =>
[...new Array(dict.length)].map((_) => p.uint8)
);
}
}
export { prep };