UNPKG

@nmmty/lazycanvas

Version:

A simple way to interact with @napi-rs/canvas in an advanced way!

36 lines (35 loc) 908 B
/// <reference types="node" /> /// <reference types="node" /> import { AnyWeight } from "../../types"; import { IFont } from "../../types"; export declare class Font implements IFont { family: string; weight: AnyWeight; path?: string; base64?: Buffer; constructor(); /** * Set the font family * @param family {string} - The `family` of the font */ setFamily(family: string): this; /** * Set the font weight * @param weight {AnyWeight} - The `weight` of the font */ setWeight(weight: AnyWeight): this; /** * Set the path of the font * @param path {string} - The `path` of the font */ setPath(path: string): this; /** * Set the base64 of the font * @param base64 {string} - The `base64` of the font */ setBase64(base64: Buffer): this; /** * @returns {IFont} */ toJSON(): IFont; }