Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

have to give one more argument for the name of the result font

  • Loading branch information...
commit b88a0ebe6234755d374112a564428878b5ee5856 1 parent f5b0b9d
nagi authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 fontcreator/scripts/changefeature.py
View
11 fontcreator/scripts/changefeature.py
@@ -2,6 +2,7 @@
# changes feature in the otf font!
# arg1 => font
# arg2 => feature_file
+# arg3 => result_font.ttf
import fontforge
import sys
@@ -9,22 +10,22 @@
TMP_FONT = "/tmp/temp.sfd"
def main():
- if len(sys.argv) != 3:
+ if len(sys.argv) != 4:
usage()
sys.exit(1)
- featureChange(sys.argv[1], sys.argv[2])
+ featureChange(sys.argv[1], sys.argv[2], sys.argv[3])
-def featureChange(Font, Feature):
+def featureChange(Font, Feature, ResultFont):
font1 = fontforge.open(Font)
font1.save(TMP_FONT)
font = fontforge.open(TMP_FONT)
for l in font.gsub_lookups:
font.removeLookup(l)
font.mergeFeature(Feature)
- font.generate('crazy_feature.ttf')
+ font.generate(ResultFont)
def usage():
- print "\nUSAGE: ", sys.argv[0], ' font_file feature_file\n'
+ print "\nUSAGE: ", sys.argv[0], ' font_file feature_file result_file.ttf\n'
if __name__ == '__main__':
main()
Please sign in to comment.
Something went wrong with that request. Please try again.