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

    1.0.2 • Public • Published

    Web font file clip tool

    Base on fonteditor-core.

    • Convert font file format from ttf, eof, otf, svg to woff, woff2
    • Clip and minimize font file to only contain specific character subset, compress to woff2 format
    import {clipToWoff2} from 'font-clip';
     
    async function main() {
      const src = Path.resolve('node_modules/font-clip/example-font/PingFang Regular.ttf');
      await clipToWoff2(src, Path.resolve('gen'), '部分中文字'));
      // Output to file gen/PingFang Regular.woff2
    }

    Install

    npm i @wfh/font-clip

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.34 kB

    Total Files

    4

    Last publish

    Collaborators

    • liujingbreak