/// import { ITree } from '../../Bulldog'; import { Processor } from '../../Processor'; import { Process } from '../Process'; /** * Options to customize WebFontMaker plugin */ export interface WebFontMakerOptions { /** * maybe you just want the fonts! if thats the case, set this to false and no CSS file will be generated */ createCss?: boolean; /** * Location to save the fonts css file that is generated */ cssLocation?: string; /** * true is you want a css file for each font, false if you want them all in one! * if the fonts are seperateed their names will be prefixed to the css output */ separateCss?: boolean; } /** * Object that contains the format to convert a font to as well as the function to transform it */ export interface FontFormats { /** * font format */ format: string; /** * function to transform the font ot the format specified */ transform: (inputContent: Buffer, options?: any) => Buffer; } /** * contains the font name and any sources for the font */ export interface FontData { family: string; src: { path: string; format: string; }[]; } /** * Object that contains font information, including family and source. */ export interface FontHash { [x: string]: FontData; } /** * WebFontMaker will find any ttf fonts in the folders and generate woff and woff2 formats * This should cover all browsers that we target * - https://caniuse.com/#search=woff * - https://caniuse.com/#search=woff2 * * This will also auto generate a font.css file based on any fonts found in your assets! */ export declare class WebFontMaker extends Process { /** * Formats to convert file too. */ formats: FontFormats[]; /** * Directory to save the generated css file. */ cssLocation: string; /** * An object used to store fonts and then generate the css file. */ hash: FontHash; /** * true if you want css files to be generated */ private createCss; /** * true if you want the a css file per font */ private separateCss; /** * * @param options - Set the css location */ constructor(options?: WebFontMakerOptions); /** * Sets initial values. * @override */ start(): void; /** * Checks if file is a .ttf * @override * @returns Is file extension .ttf */ test(tree: ITree): boolean; /** * Converts a font to woff2 and woff. * @override */ transform(tree: ITree, processor: Processor): Promise; /** * Generates a font.css file containing all converted fonts. * @override */ finish(_tree: ITree, processor: Processor): void; } //# sourceMappingURL=WebFontMaker.d.ts.map