fontmin-spider
Version:
Analyze which fonts are used on the page and eliminate the ones that are not used to get a smaller font file
23 lines (22 loc) • 977 B
TypeScript
/// <reference types="node" />
import { Tkv } from '../types';
/**
* Get font used
* @param { Tkv } declaredFamilyMap Mapping of used fonts
* @param { string | Buffer } content css file content
*/
export declare function getUseFamily(declaredFamilyMap: Tkv, content: string | Buffer): string;
/**
* Parsing the fonts used
* @param { string } basePath You can think of it as the root of the website
* @param { Tkv } declaredFamilyMap Mapping of used fonts
* @param { string | Buffer } content css file content
* @param { string } importPath css file path
*/
export declare function parseUseFamily(basePath: string, declaredFamilyMap: Tkv, content: string | Buffer, importPath: string): void;
/**
* Parse the selector that uses fonts
* @param { Tkv } declaredFamilyMap Mapping of used fonts
* @param { string | Buffer } content css file content
*/
export declare function parseSelector(declaredFamilyMap: Tkv, content: string | Buffer): void;