UNPKG

fontawesome-subset

Version:

Utility to create subsets for FontAwesome and FontAwesome Pro.

30 lines (29 loc) 1.11 kB
import { FAFamilyMetaType, FAFamilyType, FAIconType, FAStyleType, IconFamilyYAML, IconYAML, PackageType, Subset } from "./types"; export declare function findIconByName(yaml: IconYAML, iconNameOrAlias: string): FAIconType | undefined; export declare function findIconByName(yaml: IconFamilyYAML, iconNameOrAlias: string): FAFamilyMetaType | undefined; /** * Add an icon to the debug / warning error report. * * @param errors * @param fontFamily * @param icon */ export declare function addIconError(errors: Partial<Record<Subset, string[]>>, fontFamily: Subset, icon: string | string[]): void; /** * Check if an icon supports the requested style. * * @param icon * @param subset * @param packageType */ export declare function iconHasStyle(icon: FAFamilyMetaType, subset: Subset, packageType: PackageType): boolean; /** * Convert FontAwesome's confusing new naming scheme to the previous 'styles' * listed in the old icon meta. * * @param subset */ export declare const getFamilyMetaBySubset: (subset: Subset) => { family: FAFamilyType; style: FAStyleType; };