A bounding box is an enclosing box that describes the smallest measure within which all the points lie.
It is used to calculate the bounding box of a glyph or text path.
This is the encoding used for fonts created from scratch.
It loops through all glyphs and finds the appropriate unicode value.
Since it's linear time, other encodings will be faster.
@exports opentype.DefaultEncoding
@class
@constructor
@param {opentype.Font}
A bézier path containing a set of path commands similar to a SVG path.
Paths can be drawn on a context using draw.
@exports opentype.Path
@class
@constructor
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}
Decodes an old-style Macintosh string. Returns either a Unicode JavaScript
string, or 'null' if the encoding is unsupported. For example, we do
not support Chinese, Japanese or Korean because these would need large
mapping tables.
@param {DataView} dataView
@param {number} offset
@param {number} dataLength
@param {string} encoding
@returns {string}
Encodes an old-style Macintosh string. Returns a byte array upon success.
If the requested encoding is unsupported, or if the input string contains
a character that cannot be expressed in the encoding, the function returns
'null'.
@param {string} str
@param {string} encoding
@returns {Array}
Convert a signed number between -32768 and +32767 to a three-byte value.
This ensures we always use three bytes, but is not the most compact format.
@param {number}
@returns {Array}
Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value.
This is useful if you want to be sure you always use four bytes,
at the expense of wasting a few bytes for smaller numbers.
@param {number}
@returns {Array}