import { LoggerOptions } from "../types/Logger"; import { ProviderInterface } from "../types/Provider"; import { MetaData, MetaDataset } from "../types/Metadata"; import { SubsetItem } from "../types/SubsetItem"; import { ProviderOptions } from "../types/ProviderOptions"; export declare abstract class SubsetProvider implements ProviderInterface { abstract packageName: string; protected abstract fontName: string; protected abstract cssPrefix: string; protected abstract fontHeight?: number; protected abstract descent?: number; protected fontFileName: string | undefined; protected minVersion: string | undefined; protected maxVersion: string | undefined; protected hasMultipleStyles: boolean; /** * @name getAllMetaData * @description This method should be implemented by subclass, to construct a mata data dictionary * which will be used for query. * * @return {MetaDataset} */ protected abstract getAllMetaData(): MetaDataset; /** * @name normalizeIconMeta * @description This method should be implemented by subclass, about how to get the normalized metadata * of a single icon with name "iconName". It should first get the data from `this.allMetaData`, and then * "normalize" the result in the format of `MetaData`. * @param {string}iconName * @return {MetaData} */ protected abstract normalizeIconMeta(iconName: string): MetaData; /** * This method get the LICENSE file path from the target font package. Subclass should override it if failed. */ protected get fontLicensePath(): string | undefined; private _subset; private _baseDir; protected _subsetMeta: MetaDataset | undefined; private _allMetaData; private _version; private _logger; protected _options: ProviderOptions; protected constructor(subset: SubsetItem[], options?: ProviderOptions); get options(): ProviderOptions; setOptions(key: keyof ProviderOptions, value: any, override?: boolean, ignoreUndefined?: boolean): void; setLoggerOptions(key: keyof LoggerOptions, value: any): void; private validate; get allMetaData(): any; private get fontLicenseContent(); private get logger(); private validateIconMeta; /** * @name renameIcon * @description change icon name. This will also change how the icon is used. The purpose of this * method is to avoid identical icon name exists across subset providers in a combining process. * @return {string | undefined} **/ renameIcon(iconName: string): string | undefined; get subsetMeta(): MetaDataset; protected get baseDir(): string; private get version(); private validateVersion; /** * @name validateSubPath * @description Short-cut method to check if subdir/files from the base dir of the package. * * @param {string}subPath The direct subdir under the base dir of the package. * @return {string} The validated sub path */ protected validateSubPath(subPath: string): string; /** * @name moreValidation * @description This method can be used to do more validation for subclasses. * */ protected moreValidation(): void; private validateOptions; makeFonts(rootDir: string): Promise; }