export type Uint8 = number; export type Uint16 = number; export type Uint32 = number; export type Int16 = number; export type Int32 = number; export type FWord = Int16; export type Fixed = number; /** * A module for reading binary data. Used internally by `parseTTF()`. Keeps track of the current * position, assuming sequential reads. */ export declare class BinaryReader { private readonly options?; private readonly view; private position; constructor(data: ArrayBuffer, options?: { littleEndian?: boolean | undefined; } | undefined); /** * Read two bytes as an unsigned integer and advance the position by two bytes. */ getUint16(): Uint16; /** * Read two bytes as a signed integer and advance the position by two bytes. */ getInt16(): Int16; /** * Read four bytes as an unsigned integer and advance the position by four bytes. */ getUint32(): Uint32; /** * Read four bytes as a signed integer and advance the position by four bytes. */ getInt32(): Int32; /** * Read four bytes as a fixed-point number (2 bytes integer and 2 byte fraction) and advance the * position by four bytes. */ getFixed(): Fixed; /** * Read eight bytes as a date (seconds since 1904-01-01 00:00:00) without advancing the position. */ getDate(): Date; /** * Alias for `getUint16`. */ getFWord(): FWord; /** * Read a string of the given length and advance the position by that length. */ getString(length: number): string; /** * Look up array slice of the given length at the current position without advancing it. */ getDataSlice(offset: number, length: number): Uint8Array; /** * Get the current position. */ getPosition(): number; /** * Set the current position. */ setPosition(position: number): void; /** * Run the given action at the given position, restoring the original position afterwards. */ runAt(position: number, action: () => T): T; }