Last active
December 16, 2015 19:59
-
-
Save kaorimatz/5489391 to your computer and use it in GitHub Desktop.
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 python | |
import sys | |
import fontforge | |
if __name__ == '__main__': | |
if len(sys.argv) != 5: | |
print 'usage: %s <input-font> <output-font> <hhead-ascent> <hhead-descent>' % sys.argv[0] | |
else: | |
font = fontforge.open(sys.argv[1]) | |
font.hhea_ascent = int(sys.argv[3]) | |
font.hhea_descent = int(sys.argv[4]) | |
font.generate(sys.argv[2]) | |
font.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment