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
Required: | |
https://www.npmjs.com/package/otf2svg | |
https://github.com/marmooo/ttf2svg | |
npm install otf2svg -g | |
npm install @marmooo/ttf2svg -g | |
otf2svg /path/to/input.otf /path/to/output.svg | |
ttf2svg font.ttf --font > font.svg |
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
import fontforge | |
import sys | |
from os import path | |
if len(sys.argv) < 2: | |
print("Usage : {0} file.ttf".format(sys.argv[0])) | |
exit(1) | |
ttf_file = sys.argv[1] | |
svg_file = "{0}.svg".format(ttf_file.split(".")[0]) |