Last active
February 2, 2021 10:02
-
-
Save cfxd/9ddbba4607ceec5a2a2e to your computer and use it in GitHub Desktop.
Install The CSS3 Font Converter (http://www.useragentman.com/blog/the-css3-font-converter/) on OS X Yosemite for on demand @font-face conversion on the command line. Also see http://cfxdesign.com/css3-font-converter-is-a-command-line-font-face-converter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. $ brew install fontforge ttf2eot ttfautohint | |
2. $ brew tap bramstein/webfonttools && brew install sfnt2woff | |
3. Download/clone https://github.com/google/woff2 into any handy dir | |
cd into dir and: | |
$ git submodule init | |
$ git submodule update | |
$ make clean all | |
then: | |
$ ln -s /path/to/woff2_compress /usr/local/bin/woff2_compress | |
$ ln -s /path/to/woff2_decompress /usr/local/bin/woff2_decompress | |
4. Download/clone https://github.com/zoltan-dulac/css3FontConverter into /usr/local/bin/css3FontConverter | |
5. Add these two lines to ~/.profile | |
# Convert TTF/OTF font to @font-face font stack | |
alias fontstack='/usr/local/bin/css3FontConverter/convertFonts.sh' | |
6. Restart your Terminal | |
7. In Terminal, cd into the dir containing your font and run: | |
$ fontstack font-to-convert.ttf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment