brew tap bramstein/webfonttools
brew install woff2
Or install any of the following formulas with brew install <formula>:
afdko: The Adobe Font Development Kit for OpenType.sfnt2woff: Tool for converting TrueType and OpenType font files to WOFF made by Jonathan Kew. This installs two utilitiessfnt2woffto compress andwoff2sfntto decompress.sfnt2woff-zopfli: Modified version of sfnt2woff that uses the Zopfli compression algorithm (2-5% better compression than standard WOFF). This installs two utilitiessfnt2woff-zopflito compress andwoff2sfnt-zopflito decompress.woff2: WOFF2 compression and decompression utilities by Google. This installs two utilitieswoff2_compressto compress andwoff2_decompressto decompress.ttf2eot: Tool for converting TrueType font files to the embedded OpenType format (EOT). Does not include MTX compression. The installed utility is calledttf2eot.sfntly: Google's subsetting and font conversion tools. This will install two utilities calledsfnttoolandfontinfo. Thesfnttoolutility performs subsetting and can also create WOFF and EOT files. Thefontinfoutility shows you information about a font.fonttools: TTX/fonttools (this package is now in homebrew-core, you canbrew installit without this tap).ots: OpenType sanitiser
So which tool should you use to create web fonts? I recommend the following because they create the smallest possible font files:
- WOFF2: Use
woff2. - WOFF: Use
sfnt2woff-zopfliif you're generating static files, usesfnt2wofforfonttoolsif you're dynamically generating WOFF files. - EOT: Use
sfntly'ssfnttoolwith the-eand-xoptions to generate compressed EOT files.