import { type DataWriter } from '../data-writer.ts'; import { TableBuilder } from '../table-builder.ts'; /** * The 'head' (Font Header) table contains global information about the font. */ export declare class HeadTable { /** Use version string `NameId.versionString` in name table instead. */ readonly fontRevision: number; /** The adjustment value to verify the font's checksum. */ readonly checksumAdjustment: number; /** Bit flags, see `HeadFlags`. */ readonly flags: number; /** Valid values range from 16 to 16384. Should be a power of 2 for TrueType fonts. */ readonly unitsPerEm: number; /** Creation date and time. */ readonly created: Date; /** Modification date and time. */ readonly modified: Date; /** Minimum x coordinate across all glyph bounding boxes. */ readonly xMin: number; /** Minimum y coordinate across all glyph bounding boxes. */ readonly yMin: number; /** Maximum x coordinate across all glyph bounding boxes. */ readonly xMax: number; /** Maximum y coordinate across all glyph bounding boxes. */ readonly yMax: number; /** Bit flags, see `MacStyle`. */ readonly macStyle: number; /** Smallest readable size in pixels. */ readonly lowestRecPPEM: number; /** Indicates the type of offset format used in the 'loca' table: 0: 16 bit, 1: 32 bit. */ readonly indexToLocFormat: number; /** * Reads a 'head' table from the given DataView. */ static read(data: DataView): HeadTable; private constructor(); } /** * Builder for the 'head' table. */ export declare class HeadTableBuilder extends TableBuilder { fontRevision: number; flags: number; unitsPerEm: number; created: Date; modified: Date; xMin: number; yMin: number; xMax: number; yMax: number; macStyle: number; lowestRecPPEM: number; /** * Indicates the type of offset format used in the 'loca' table: 0: 16 bit, 1: 32 bit */ indexToLocFormat: number; constructor(init?: HeadTable); writeTable(writer: DataWriter): void; } /** * Bit flags for the `macStyle` field in the 'head' table. */ export declare const MacStyle: { readonly bold: 1; readonly italic: 2; readonly underline: 4; readonly outline: 8; readonly shadow: 16; readonly condensed: 32; readonly extended: 64; }; /** * Bit flags for the `flags` field in the 'head' table. */ export declare const HeadFlags: { readonly baselineAtY0: 1; readonly leftSideBearingAtX0: 2; readonly instructionsMayDependOnPointSize: 4; readonly forcePpemToIntegerValues: 8; readonly instructionsMayAlterAdvanceWidth: 16; readonly fontDataIsLossless: 2048; readonly fontConverted: 4096; readonly fontOptimizedForClearType: 8192; readonly lastResortFont: 16384; }; export declare function toLongDateTime(date: Date): { hi: number; lo: number; }; export declare function fromLongDateTime(hi: number, lo: number): Date;