Skip to content

Instantly share code, notes, and snippets.

@caiosba
Created October 19, 2014 20:45
Show Gist options
  • Save caiosba/e4321ae230dc5cacad59 to your computer and use it in GitHub Desktop.
Save caiosba/e4321ae230dc5cacad59 to your computer and use it in GitHub Desktop.
otf2ttf
#!/usr/local/bin/fontforge
# Quick and dirty hack: converts a font to truetype (.ttf)
# You need to install fontforge: aptitude install fontforge
# After that, simply run: fontforge -script otf2ttf.sh FONTNAME.otf
# Or, for a bunch of files: for i in *.otf; do fontforge -script otf2ttf.sh $i; done
Print("Opening " + $1);
Open($1);
Print("Saving " + $1:r + ".ttf");
Generate($1:r + ".ttf");
Quit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment