summaryrefslogtreecommitdiff
path: root/makefont.py
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-27 11:41:40 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-27 11:41:40 +0200
commit2b194b83286424408694bd9b230b816736fd6c5f (patch)
treee35834b8989158825d96285aae40e9fecd34c856 /makefont.py
parent13dd8822cf60ad30fb346bbb0dfa6875e3abd46a (diff)
added simple binary font data
Diffstat (limited to 'makefont.py')
-rw-r--r--makefont.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/makefont.py b/makefont.py
new file mode 100644
index 0000000..22ee576
--- /dev/null
+++ b/makefont.py
@@ -0,0 +1,42 @@
+# this is a simple script to convert the binfont.src into binary
+# everything but 0 an 1 are ignored
+
+import binascii
+
+f=open("binfont.src",'r')
+o=open("binfont.bin",'wb')
+
+b=""
+l=0
+while True:
+
+ c=f.read(1)
+
+ if not c:
+ break
+
+ if c=="0":
+ l+=1
+ b+=c
+
+ if c=="1":
+ l+=1
+ b+=c
+
+ if l==8:
+ print b
+ l=0
+ o.write(chr(int(b,2)))
+ b=""
+
+
+
+
+
+print "eof"
+
+
+
+o.close()
+
+