Created
April 9, 2013 14:49
-
-
Save rc1/5346303 to your computer and use it in GitHub Desktop.
Converts OpenType fonts file to an Embedded OpenType file on the Mac. Tools installed via homebrew on Mac.
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
#!/bin/sh | |
# Convert an OTF font into TTF an EOT formats. | |
# @source: http://stackoverflow.com/a/2467452/179015 | |
# @note: brew install fontforge | |
# brew install | |
# @usage: sh otf2ttf2eot.sh FontName | |
otfFont="$1.otf" | |
ttfFont="$1.ttf" | |
eotFont="$1.eot" | |
fontforge -c ' | |
font = fontforge.open("'$otfFont'"); | |
font.generate("'$ttfFont'"); | |
quit(0);' | |
ttf2eot $ttfFont > $eotFont |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment