@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
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    0

Package Sidebar

Install

npm i @wfh/font-clip

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

7.34 kB

Total Files

4

Last publish

Collaborators

  • liujingbreak