import { default as p5ex } from '../p5exInterface'; /** * Font class. */ export declare class FontUnit { protected readonly p: p5ex; private readonly filePath; private textFontArgument; /** * * @param p - p5ex instance. * @param {string} name - The font name. * @param {string} [filePath] - The file path of the font. * Not required if the font is already loaded (e.g. as a web font). */ constructor(p: p5ex, name: string, filePath?: string); /** * Loads the font file if the file path has been specified. */ loadFile(): void; /** * Applies the font to the current renderer. */ applyFont(): void; } /** * Manager class of FontUnit. */ export declare class FontManager { protected readonly p: p5ex; protected readonly fontMap: Map; /** * * @param p - p5ex instance. */ constructor(p: p5ex); /** * Registers a new font. * @param p * @param name * @param filePath * @chainable */ register(name: string, filePath?: string): FontManager; /** * Calls loadFile() for each registered font. Should be called in preload(). */ loadAll(): void; /** * Applies the specified font to the current renderer. * @param {string} name - The font name. */ applyFont(name: string): void; }