npm

@types/subset-font
TypeScript icon, indicating that this package has built-in type declarations

1.4.3 • Public • Published

Installation

npm install --save @types/subset-font

Summary

This package contains type definitions for subset-font (https://github.com/papandreou/subset-font).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/subset-font.

index.d.ts

/// <reference types="node" />

/**
 * Object for adjusting options on subset-font output.
 */
interface SubsetFontOptions {
    /**
     * The desired output format. Defaults to the format of the original font.
     */
    targetFormat?: "sfnt" | "woff" | "woff2" | "truetype";
    /**
     * An array of numbers specifying the extra name ids to preserve in the name table. See README for details.
     */
    preserveNameIds?: number[];
}

/**
 * Create a subset font from an existing font in SFNT (TrueType/OpenType), WOFF, or WOFF2 format.
 *
 * @param buffer A buffer containing the original font to subset.
 * @param text A string of characters to subset the original font to.
 * @param options Additional options to configure the subsetter with.
 */
declare function subsetFont(buffer: Buffer, text: string, options?: SubsetFontOptions): Promise<Buffer>;

export = subsetFont;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Logan Graham.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/subset-font

Weekly Downloads

975

Version

1.4.3

License

MIT

Unpacked Size

4.41 kB

Total Files

5

Last publish

Collaborators

  • types