UNPKG

opentype.features.js

Version:

Library to list opentype fonts optional features.

28 lines (27 loc) 984 B
export type TableData = { /** * - The data offset. */ offset: number; }; import Font from "./font"; /** * Asynchronously load the font from a URL or a filesystem. When done, call the callback * with two arguments `(err, font)`. The `err` will be null on success, * the `font` is a Font object. * We use the node.js callback convention so that * opentype.js can integrate with frameworks like async.js. * @alias opentype.load * @param {string} url - The URL of the font to load. * @param {Function} callback - The callback. */ export function load(url: string, callback: Function, opt: any): Promise<any>; /** * Parse the OpenType file data (as an ArrayBuffer) and return a Font object. * Throws an error if the font could not be parsed. * @param {ArrayBuffer} * @param {Object} opt - options for parsing * @return {opentype.Font} */ export function parseBuffer(buffer: any, opt: Object): opentype.Font; export { Font };