summaryrefslogtreecommitdiff
path: root/third_party/spiro/font/mkblends.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/spiro/font/mkblends.py')
-rw-r--r--third_party/spiro/font/mkblends.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/spiro/font/mkblends.py b/third_party/spiro/font/mkblends.py
new file mode 100644
index 0000000..09fe882
--- /dev/null
+++ b/third_party/spiro/font/mkblends.py
@@ -0,0 +1,16 @@
+import os, sys
+
+glyphmap = {}
+for ln in file(sys.argv[1]).xreadlines():
+ fnglyph = ln.strip().split(': ')
+ if len(fnglyph) == 2:
+ fn, name = fnglyph
+ pgmf = fn[:-4] + '.pgm'
+ if not glyphmap.has_key(name):
+ glyphmap[name] = []
+ glyphmap[name].append(pgmf)
+for name in glyphmap.iterkeys():
+ cmd = '~/garden/font/blend ' + ' '.join(glyphmap[name]) + ' | pnmtopng > ' + name + '.png'
+ print cmd
+ os.system(cmd)
+