import type { uint16 } from "../../types.ts"; import type { Reader } from "../binary/reader.ts"; /** Name IDs */ export declare const NameId: { readonly Copyright: 0; readonly FontFamily: 1; readonly FontSubfamily: 2; readonly UniqueID: 3; readonly FullName: 4; readonly Version: 5; readonly PostScriptName: 6; readonly Trademark: 7; readonly Manufacturer: 8; readonly Designer: 9; readonly Description: 10; readonly ManufacturerURL: 11; readonly DesignerURL: 12; readonly License: 13; readonly LicenseURL: 14; readonly Reserved: 15; readonly TypographicFamily: 16; readonly TypographicSubfamily: 17; readonly CompatibleFullName: 18; readonly SampleText: 19; readonly PostScriptCIDFindfontName: 20; readonly WWSFamily: 21; readonly WWSSubfamily: 22; readonly LightBackgroundPalette: 23; readonly DarkBackgroundPalette: 24; readonly VariationsPostScriptNamePrefix: 25; }; /** Platform IDs */ export declare const PlatformId: { readonly Unicode: 0; readonly Macintosh: 1; readonly Reserved: 2; readonly Windows: 3; }; /** Windows encoding IDs */ export declare const WindowsEncodingId: { readonly Symbol: 0; readonly UnicodeBMP: 1; readonly ShiftJIS: 2; readonly PRC: 3; readonly Big5: 4; readonly Wansung: 5; readonly Johab: 6; readonly UnicodeFullRepertoire: 10; }; /** A single name record */ export interface NameRecord { platformId: uint16; encodingId: uint16; languageId: uint16; nameId: uint16; value: string; } /** Name table */ export interface NameTable { format: uint16; records: NameRecord[]; } /** * Parse name table - font naming information in multiple languages * @param reader - Reader positioned at start of name table * @returns Parsed name table with decoded name records */ export declare function parseName(reader: Reader): NameTable; /** Get a specific name by ID, preferring Windows Unicode */ export declare function getNameById(table: NameTable, nameId: number, languageId?: number): string | null; /** Get font family name */ export declare function getFontFamily(table: NameTable): string | null; /** Get font subfamily (style) */ export declare function getFontSubfamily(table: NameTable): string | null; /** Get full font name */ export declare function getFullName(table: NameTable): string | null; /** Get PostScript name */ export declare function getPostScriptName(table: NameTable): string | null; /** Get version string */ export declare function getVersion(table: NameTable): string | null;