Created
October 29, 2015 09:32
-
-
Save yrcjaya/51100f504b6aa7db139b to your computer and use it in GitHub Desktop.
Convert font TTC to TTF
This file contains hidden or 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
"""Convert TTC font to TTF using fontforge with python extension. | |
**Warning** The scripts saves splitted fonts in the current working directory. | |
Usage: | |
split_ttc_font_to_ttf.py Droid.ttc | |
""" | |
import sys | |
import fontforge | |
fonts = fontforge.fontsInFile(sys.argv[1]) | |
for fontName in fonts: | |
font = fontforge.open('%s(%s)'%(sys.argv[1], fontName)) | |
font.generate('%s.ttf'%fontName) | |
font.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment