diff options
| author | Jakob Fries <jakob.fries@gmail.com> | 2007-12-25 03:25:13 +0000 |
|---|---|---|
| committer | Jakob Fries <jakob.fries@gmail.com> | 2007-12-25 03:25:13 +0000 |
| commit | cd6d5e6237acf659d75fa64568506c152ce41ec9 (patch) | |
| tree | 34f0a110da3796d10d272bd4742b000503103326 /scripts | |
| parent | 23d50255d2527c2aa1fa15964f0fd22d0ba95bc2 (diff) | |
| download | zcatch-cd6d5e6237acf659d75fa64568506c152ce41ec9.tar.gz zcatch-cd6d5e6237acf659d75fa64568506c152ce41ec9.zip | |
new fonts added, lots more magic font code added, server bug fixed
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/font_converter.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/font_converter.py b/scripts/font_converter.py index 0293c623..d8ba5d39 100644 --- a/scripts/font_converter.py +++ b/scripts/font_converter.py @@ -1,6 +1,7 @@ from __future__ import with_statement import struct import sys +import re def convert(input, output): with open(input, "r") as in_file: @@ -9,7 +10,6 @@ def convert(input, output): dic = {} for part in parts: - print parts, part key, value = part.split('=') try: @@ -132,10 +132,17 @@ def convert(input, output): else: write_default_kerning() -if len(sys.argv) != 3: - print "font converter! converts .fnt files to teewars .tfnt" - print "usage: font_converter <input> <output>" -else: +if len(sys.argv) >= 2: print "converting..." - convert(sys.argv[1], sys.argv[2]) + + filenames = sys.argv[1:] + for filename in filenames: + input = filename + output = re.sub("fnt$", "tfnt", input) + + print "input: %s, output: %s" % (input, output) + convert(input, output) print "done!" +else: + print "font converter! converts .fnt files to teewars .tfnt" + print "usage: font_converter <input>" |