import type { LayoutElement } from "../layoutElement.js"; /** * Contains the subsets of fonts * Only the present entries are used, the rest should be ignored during subset creation */ export interface SubsetConfig { /** * The normal font subset */ normal?: string; /** * The italic font subset */ italic?: string; /** * The bold font subset */ bold?: string; /** * The bold italic font subset */ boldItalic?: string; } /** * Helper to collect font subsets */ export declare class SubsetCollector { private readonly defaultFont; /** * Temporary subsets */ private readonly temporarySubsets; /** * The computed subsets */ readonly subsets: Map; /** * Creats a new subset collector * Results are stored in the subsets field, which can be accessed after construction * * @param element the element to collect the font subset information for * @param defaultFont the default font to use if no font is specified for a span */ constructor(element: LayoutElement, defaultFont: string); /** * Recursively collects the font subset information of the given element * * @param element the element to collect the subset information for */ private collect; /** * Gets the subsets based on the font family, weight and style * Assumes that the provided element is a span * * @returns the subset for the given font family, weight and style */ private getSubset; /** * Converts a temporary subset to a subset config * If the temporary subset is empty, undefined is returned * * @param temporary the temporary subset * @returns the subset config */ private convertToSubset; } //# sourceMappingURL=subsetCollector.d.ts.map