Created
November 7, 2011 21:52
-
-
Save liamcurry/1346312 to your computer and use it in GitHub Desktop.
Converting fonts with fontforge and python
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
import fontforge | |
import os.path | |
filename = 'the-filename' | |
basename, ext = os.path.splitext(filename) | |
desired_formats = ['otf', 'eot'] | |
font = fontforge.open(filename) | |
for desired_format in desired_formats: | |
font.generate('%s.%s' % (basename, desired_format)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment