npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@0x6b/ttf2woff2-wasm

v0.11.0

Published

Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)

Readme

ttf2woff2-wasm

Convert TTF fonts to WOFF2 format. WASM build of 0x6b/ttf2woff2.

Drop-in replacement for nfroidure/ttf2woff2 with zero native dependencies.

[!NOTE] This package uses a different Brotli implementation, so the output may differ in size from nfroidure/ttf2woff2. Please verify the output fonts work correctly in your target environment before deploying to production.

Installation

$ npm install @0x6b/ttf2woff2-wasm

Usage

const ttf2woff2 = require("@0x6b/ttf2woff2-wasm");
const fs = require("fs");

const ttf = fs.readFileSync("font.ttf");
const woff2 = ttf2woff2(ttf);
fs.writeFileSync("font.woff2", woff2);

Migration from nfroidure/ttf2woff2

package.json:

-"ttf2woff2": "^3.0.0"
+"@0x6b/ttf2woff2-wasm": "^0.10.3"

Your code:

-const ttf2woff2 = require('ttf2woff2');
+const ttf2woff2 = require('@0x6b/ttf2woff2-wasm');

const woff2 = ttf2woff2(ttfBuffer);

API

ttf2woff2(input: Buffer | Uint8Array): Buffer

Convert TTF font data to WOFF2 format synchronously.

Benchmark

Compared with ttf2woff2 v8.0.0 on Apple M4 Pro:

Conversion Performance

WarpnineSans-Regular.ttf (269 KB)
  native: avg=930ms  mem=45.9 KB
  wasm:   avg=387ms  mem=21.3 KB
  → 2.4x faster, 2.2x less memory

NotoSansJP-Medium.ttf (5.5 MB)
  native: avg=13592ms  mem=20.6 KB
  wasm:   avg=7807ms   mem=11.4 KB
  → 1.7x faster, 1.8x less memory

Run locally: cd bench && npm install ttf2woff2 && node --expose-gc benchmark.cjs

Package Size

| Package | Installed | | ---------------------- | --------- | | ttf2woff2-wasm v0.10.3 | 972 KB | | ttf2woff2 v8.0.0 | 11 MB |

11x smaller installed size (no native compilation needed).

License