Commit 5ece4383ec2cb5b6bc3c4f9732f74535dd6e12db

Darren Embry 2023-11-22T15:02:20

check for additional errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/bin/zeroslash.py b/bin/zeroslash.py
index 7c2bccb..a3631bb 100755
--- a/bin/zeroslash.py
+++ b/bin/zeroslash.py
@@ -9,9 +9,15 @@ import argparse
 
 def copyChar(font, sourceCharName, destCharName, encoding=-1):
     if not destCharName in font:
+        if encoding < 0
+            raise Exception("%s not found and no encoding specified" % destCharName)
         font.createChar(encoding, destCharName)
     sourceChar = font[sourceCharName]
+    if not sourceChar:
+        raise Exception("%s not found" % sourceCharName)
     destChar = font[destCharName]
+    if not destChar:
+        raise Exception("%s not found" % destCharName)
     pen = destChar.glyphPen(replace=True)
     sourceChar.draw(pen)
     pen = None                  # finalize pen drawing