{"_id":"@0x6b/ttf2woff2-wasm","_rev":"7-d068becda8ea10d4e650ad6fe1f7247f","name":"@0x6b/ttf2woff2-wasm","dist-tags":{"latest":"0.13.2"},"versions":{"0.10.3":{"name":"@0x6b/ttf2woff2-wasm","version":"0.10.3","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.10.3","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"788a005616153585641c48a69c9d61d8c3a56cad","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.10.3.tgz","fileCount":10,"integrity":"sha512-JYi79ouGzdKYRRVD4GeAZ5aFwQNVgnaKG/8vlOeNIbTz9OXkE0cFk5zddG9lFgmGQA7PXXiO3Si0fbynaOR00w==","signatures":[{"sig":"MEYCIQDdZBRsYCOiYBOfBC5yaVY8pu/ltQgFHz3+E0MAwxEolAIhAIEUCDSc4nCyD/k2n2mkUNpEBvxSCrrRqA7xR2AyYG3D","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":964349},"main":"index.js","types":"index.d.ts","gitHead":"d4160f9bdd921eb7753e57483dd82826fe32a58e","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.6.2","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.10.3_1767788885036_0.6883864329003941","host":"s3://npm-registry-packages-npm-production"}},"0.10.4":{"name":"@0x6b/ttf2woff2-wasm","version":"0.10.4","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.10.4","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"3325cd494954ff656300166a1d0d0f324bc9b62f","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.10.4.tgz","fileCount":10,"integrity":"sha512-ynCzWYv/wgX1y1v54jLKMR9NC9ScuS0NlAPrBj09awIzZRsjzVq+vnN/4NHYmEAYGfpOio8IOxo62j+siDHYwA==","signatures":[{"sig":"MEQCIH8udhD4+gdSmUJKzG0rSepp2CTiVemB81AU08dWS1+CAiBbGWKMSE3MFN69hVKrDLOvur7scCb/g2JPHpTeYLhvWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":964263},"main":"index.js","types":"index.d.ts","gitHead":"c510e4cc71cc4e97c745a7a8a9fbfb731d4d24e1","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.6.2","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.10.4_1768102499447_0.1193834688973221","host":"s3://npm-registry-packages-npm-production"}},"0.11.0":{"name":"@0x6b/ttf2woff2-wasm","version":"0.11.0","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.11.0","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"ddb5a652f61cc16d2d3eede7a598b2058b222995","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.11.0.tgz","fileCount":10,"integrity":"sha512-D8Q0awVxIdoTfHwPWWMlxEjN6hfWHVZNUxXilceQKje6lDDquhqUOj1RRNgpo3zdZGuPCdCJHLrDxbp/ZAIGDA==","signatures":[{"sig":"MEYCIQC6uccWzlyKGl4eT0GKM1AxR7HRm95dkgrWw9pbjG3L5QIhAIqkpXAE6VMxbLEqXS/VoDLNEi5xdjVKWflHtfc+SYob","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":964345},"main":"index.js","types":"index.d.ts","gitHead":"29a18a5cb7102741e472517ce00ae6cfa0d46ca2","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.6.2","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.11.0_1768223321136_0.7805516774313077","host":"s3://npm-registry-packages-npm-production"}},"0.11.1":{"name":"@0x6b/ttf2woff2-wasm","version":"0.11.1","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.11.1","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"eeb83ab64b5825629b17481978b5200b744ee2e6","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.11.1.tgz","fileCount":10,"integrity":"sha512-KWg6vDWQV/cOvRB53OGtCuSktQZciESraTKcK1xPsLO57mAxj4TQyJlHD4o6/dW3i2+37RDoTEt3CyzqlHzhdw==","signatures":[{"sig":"MEQCID+bsNe6UlRXPDKRwn2tNnGjtOYTIEIvC0p2Lu45zcisAiB67EuTR/5wJYGjNe5ccK4a+6ir/IMFTs7H7BY9nxniEA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":960314},"main":"index.js","types":"index.d.ts","gitHead":"248ea478ca114dd7010cd81ef79b4ea32eb0bddc","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.12.1","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.11.1_1777871065127_0.7023240004689337","host":"s3://npm-registry-packages-npm-production"}},"0.13.0":{"name":"@0x6b/ttf2woff2-wasm","version":"0.13.0","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.13.0","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"2f4033d5738c8c6d12d24b7e91b49dc46bd6fc60","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.13.0.tgz","fileCount":10,"integrity":"sha512-xB6p4iRCd0HqfX8RP9ZIb+hPl8SgILBTf+mlPUtSceCiO7J6gqxes4ZXRnWeezSJL41kliTUcDcq0xDf6BtAkg==","signatures":[{"sig":"MEQCIGU4+YZVis+/jSnackFVj8L4+JKEn1vUrXqDCBLoq1SqAiBxRCIE5FHwNwiBAHF7VcmakbNENueoGp8aijnn7rVxYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":960335},"main":"index.js","types":"index.d.ts","gitHead":"969d053e97356ffacd52456dc9a4310a6abd8ab6","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.16.0","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.13.0_1781444383787_0.06348512641045478","host":"s3://npm-registry-packages-npm-production"}},"0.13.1":{"name":"@0x6b/ttf2woff2-wasm","version":"0.13.1","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"license":"MIT OR Apache-2.0","_id":"@0x6b/ttf2woff2-wasm@0.13.1","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"dist":{"shasum":"167caab7cc2ba175d6f9c67f4dae4e2cdaba14a2","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.13.1.tgz","fileCount":10,"integrity":"sha512-0Qs9Kn+8ekhat5RGY7s9VIgpxto6s379w2dGBdS9q0i8f27BySLsFkrQMhSRJZ5szngHhIM1ukFnNJXAemGlWg==","signatures":[{"sig":"MEQCIAFEMnTif6PsnCpq0cFk0tKfJnBFmrK6wUU3OD/aEpvQAiA/7OHVT5hYKuPCy+RV6jOljb8e54Y4h5PbwOB4oJht4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":960933},"main":"index.js","types":"index.d.ts","gitHead":"819ef2faaa8c023e73bd5c7d4ee9f5cf71e866f4","_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"repository":{"url":"git+https://github.com/0x6b/ttf2woff2-wasm.git","type":"git"},"_npmVersion":"11.16.0","description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ttf2woff2-wasm_0.13.1_1781485397476_0.7743741446049015","host":"s3://npm-registry-packages-npm-production"}},"0.13.2":{"name":"@0x6b/ttf2woff2-wasm","publishConfig":{"access":"public"},"description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","version":"0.13.2","license":"MIT OR Apache-2.0","repository":{"type":"git","url":"git+https://github.com/0x6b/ttf2woff2-wasm.git"},"keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"main":"index.js","types":"index.d.ts","gitHead":"819ef2faaa8c023e73bd5c7d4ee9f5cf71e866f4","_id":"@0x6b/ttf2woff2-wasm@0.13.2","bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-9xCQLkTYhVaMxmoAQqQkNcC0g9FOF7gLxpaAUof8lqeMSsLYLHe+ye+qbG68HZDhJrSFvroPkFn6N/SdfqjM7Q==","shasum":"99e42955f56886926ac490b18b6e5d938ef2c780","tarball":"https://registry.npmjs.org/@0x6b/ttf2woff2-wasm/-/ttf2woff2-wasm-0.13.2.tgz","fileCount":10,"unpackedSize":961253,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEWBfr9kthQcTapKvu4HET3bofAqnJjKkqe+Gy132qAiAiEA8HGFnHXG9nxPIxQzZPPYpmBnyzbjA/pJBRGgDQprYXw="}]},"_npmUser":{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"},"directories":{},"maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ttf2woff2-wasm_0.13.2_1783863827881_0.5523166010293921"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T12:28:04.957Z","modified":"2026-07-12T13:43:48.148Z","0.10.3":"2026-01-07T12:28:05.264Z","0.10.4":"2026-01-11T03:34:59.662Z","0.11.0":"2026-01-12T13:08:41.328Z","0.11.1":"2026-05-04T05:04:25.310Z","0.13.0":"2026-06-14T13:39:44.013Z","0.13.1":"2026-06-15T01:03:17.676Z","0.13.2":"2026-07-12T13:43:48.042Z"},"bugs":{"url":"https://github.com/0x6b/ttf2woff2-wasm/issues"},"license":"MIT OR Apache-2.0","homepage":"https://github.com/0x6b/ttf2woff2-wasm#readme","keywords":["fonts","woff2","ttf","font-conversion","wasm","webassembly"],"repository":{"type":"git","url":"git+https://github.com/0x6b/ttf2woff2-wasm.git"},"description":"Convert TTF fonts to WOFF2 format (Pure Rust compiled to WASM)","maintainers":[{"name":"0x6b","email":"npm_mytidhfqd7ncqnr73yfj@warpnine.io"}],"readme":"# ttf2woff2-wasm\n\nConvert TTF fonts to WOFF2 format. WASM build of [0x6b/ttf2woff2](https://github.com/0x6b/ttf2woff2).\n\nDrop-in replacement for [nfroidure/ttf2woff2](https://www.npmjs.com/package/ttf2woff2) with zero native dependencies.\n\n> [!NOTE]\n> 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.\n\n## Installation\n\n```console\n$ npm install @0x6b/ttf2woff2-wasm\n```\n\n## Usage\n\n```js\nconst ttf2woff2 = require(\"@0x6b/ttf2woff2-wasm\");\nconst fs = require(\"fs\");\n\nconst ttf = fs.readFileSync(\"font.ttf\");\nconst woff2 = ttf2woff2(ttf);\nfs.writeFileSync(\"font.woff2\", woff2);\n```\n\n## Migration from nfroidure/ttf2woff2\n\npackage.json:\n\n```diff\n-\"ttf2woff2\": \"^3.0.0\"\n+\"@0x6b/ttf2woff2-wasm\": \"^0.10.3\"\n```\n\nYour code:\n\n```diff\n-const ttf2woff2 = require('ttf2woff2');\n+const ttf2woff2 = require('@0x6b/ttf2woff2-wasm');\n\nconst woff2 = ttf2woff2(ttfBuffer);\n```\n\n## API\n\n### `ttf2woff2(input: Buffer | Uint8Array): Buffer`\n\nConvert TTF font data to WOFF2 format synchronously.\n\n## Benchmark\n\nCompared with [ttf2woff2](https://www.npmjs.com/package/ttf2woff2) v8.0.0 on Apple M4 Pro:\n\n### Conversion Performance\n\n```\nWarpnineSans-Regular.ttf (269 KB)\n  native: avg=930ms  mem=45.9 KB\n  wasm:   avg=387ms  mem=21.3 KB\n  → 2.4x faster, 2.2x less memory\n\nNotoSansJP-Medium.ttf (5.5 MB)\n  native: avg=13592ms  mem=20.6 KB\n  wasm:   avg=7807ms   mem=11.4 KB\n  → 1.7x faster, 1.8x less memory\n```\n\nRun locally: `cd bench && npm install ttf2woff2 && node --expose-gc benchmark.cjs`\n\n### Package Size\n\n| Package                | Installed |\n| ---------------------- | --------- |\n| ttf2woff2-wasm v0.10.3 | 972 KB    |\n| ttf2woff2 v8.0.0       | 11 MB     |\n\n11x smaller installed size (no native compilation needed).\n\n## License\n\n- The [Noto Sans Japanese](https://fonts.google.com/noto/specimen/Noto+Sans+JP) font in [tests/fixtures/](tests/fixtures) is licensed under [OFL](https://fonts.google.com/noto/specimen/Noto+Sans+JP/license).\n- The [WarpnineSans](https://github.com/0x6b/warpnine-fonts) font in [tests/fixtures/](tests/fixtures) is licensed under [OFL](https://github.com/0x6b/warpnine-fonts/blob/main/OFL).\n- Everything else is dual-licensed under [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE).\n","readmeFilename":"README.md"}