-
-
Save prantlf/71868ee7e1b2abd6f9153237d4e2b733 to your computer and use it in GitHub Desktop.
Convert .ttc to several .ttf files into the current directory
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
#!/usr/bin/env python2 | |
import sys | |
import fontforge | |
def main(file): | |
for font in fontforge.fontsInFile(file): | |
f = fontforge.open(u'%s(%s)' % (file, font)) | |
f.generate('%s.ttf' % font) | |
if __name__ == '__main__': | |
if len(sys.argv) != 2: | |
sys.exit('one ttc file one time.') | |
main(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install fontforge with its python binding: