6.0.1 • Published 12 months ago

ttf2woff2 v6.0.1

Weekly downloads
107,835
License
MIT
Repository
github
Last release
12 months ago

ttf2woff2

Convert TTF files to WOFF2 ones.

GitHub license

This is a NodeJS wrapper for the Google WOFF2 project. If the C++ wrapper compilation fail, it fallbacks to an Emscripten build.

Usage

CLI

Install ttf2woff2 globally, then:

cat font.ttf | ttf2woff2 > font.woff2

On Windows without cat, use (in PowerShell):

Start-Process -NoNewWindow -Wait ttf2woff2.cmd -RedirectStandardInput font.ttf -RedirectStandardOutput font.woff2
# OR
start-process -nnw -wait ttf2woff2.cmd -rsi font.ttf -rso font.woff2

API

import { readFile, writeFile } from 'node:fs/promises';
import ttf2woff2 from 'ttf2woff2';

const input = await readFile('font.ttf');

await writeFile('font.woff2', ttf2woff2(input));

Contributing

Feel free to push your code if you agree with publishing under the MIT license.

Authors

License

MIT

@inevix/grunt-webfontege-iconfontcwiconfontgrunt-webfont-patchedgrunt-webfontixix-grunt-webfont@wings-j/svg2iconfontyz-webfonts-generator@infinitebrahmanuniverse/nolb-tt@everything-registry/sub-chunk-2984@wings-j/utilfontplopsvgtofontsvgtofont4wqfixsvgs2fontsvgs2fontssvgs2fonts-csvgtofontplussvg-packersvg-packer2svg-font-conjurersvg2fonts1svg2font-cmsssvg2fontpacksvg2fontssvgicon-subset-webfontsvgicon2fontsvgicon2webfontsvgfont-webpack-pluginwiki-webfonts-generatorweb-elements-iconsvusion-webfonts-generatorwiki-font-carriersuper-font-awesome-minify-pluginsvg-to-fontssvg-to-webfontsvg-to-iconfont@collab-ui/webfonts-generator@dan/cryptocoins-icons@coremyslo/font-generator@cosmicwheels/generatewebfonts@darthsoup/webfonts-generator@prageeths/grunt-webfontfont-constructor@yberion/fantasticonjipi-svg2fontiss_fantasticoniss_icon_font_generationjeuxuizupit-fantasticonnviconttf-module-loaderttf2woffs@artofrawr/generate-iconfont@assetpack/plugin-webfont@akylas/fontmin@alioth_91/fantasticon@bravobit/icon-font-generator5ug-cli@codpoe/iconfontyellowlabtoolswebpack-fontfacewebfonts-generatorwebfonts-generator-casaperwebfonts-generator-forkwebfonts-generator-lesswebfonts-generator2webfonts-helperwebfont-icons-generatorwebfont-converterwebfont-exwebpack-iconfont-pluginwebpack-iconfont-plugin-temp-forkuse-iconfontsuse-icons@guidewire/web-font-builder@gyugyu/webfonts-generator@haixee/fantasticon@hayes0724/web-font-converter@figus/cli@iconscout/unicons@geektech/svg2icon@gotoeasy/svgicon@frontify/grunt-webfont@fukumong/fantasticon@gmgallag/webfonts-generator@goodboydigital/bulldog@kreatif/starter@kuma/webpack-iconfont-plugin@lancejpollard/act@ln-e/webfonts-generator@liaoyf/webfonts-generator@maxtan/iconfont@mountbuild/mouse@neoskop/ligscrib@entelo/webfonts-generator@faizanhaider/iconsax@iota-cn/icon@ilzrv/webfonts-generator@imjano/iconifont
6.0.1

12 months ago

6.0.0

12 months ago

5.0.0

3 years ago

4.0.5

3 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.0.0

6 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago