import { ShxFontData } from './fontData'; /** * Represents a SHX font and provides methods to parse and render its characters. * This class handles the loading and parsing of SHX font files, and provides * methods to extract character shapes for rendering. */ export declare class ShxFont { /** The parsed font data containing header and content information */ readonly fontData: ShxFontData; /** Parser for converting character codes to shapes */ private readonly shapeParser; /** * Creates a new ShxFont instance. * @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData) * @throws {Error} If the font data is invalid or cannot be parsed */ constructor(data: ShxFontData | ArrayBuffer); /** * Return true if this font contains glyph of the specified character. Otherwise, return false. * @param char - The character to check * @returns True if this font contains glyph of the specified character. Otherwise, return false. */ hasChar(code: number): boolean; /** * Return true if this font contains a shape with the specified name. Otherwise, return false. * Shape names are matched case-insensitively. * @param name - The shape name to check (for example, "GRS") * @returns True if this font contains the named shape. Otherwise, return false. */ hasShape(name: string): boolean; /** * Gets the character code for a named shape. * @param name - The shape name to look up * @returns The character code, or undefined if the shape is not found */ getShapeCode(name: string): number | undefined; /** * Gets the shape name for a character code, if one is defined. * @param code - The character code to look up * @returns The shape name, or undefined if the code has no name */ getShapeName(code: number): string | undefined; /** * Gets the shape data for a named shape at a given font size. * Shape names are matched case-insensitively. * @param name - The shape name to get the shape for * @param size - The desired font size * @returns The shape data for the named shape, or undefined if it is not found in the font */ getShapeByName(name: string, size: number): import("./shape").ShxShape | undefined; /** * Gets the shape data for a specific character at a given font size. * @param code - The character code to get the shape for * @param size - The desired font size * @returns The shape data for the character, or undefined if the character is not found in the font */ getCharShape(code: number, size: number): import("./shape").ShxShape | undefined; /** * Releases resources used by the font. * This should be called when the font is no longer needed to free up memory. */ release(): void; }