diff --git a/Lib/fontTools/psLib.py b/Lib/fontTools/psLib.py index 840868092..314171e45 100644 --- a/Lib/fontTools/psLib.py +++ b/Lib/fontTools/psLib.py @@ -1,7 +1,7 @@ import StringIO import regex import string -import eexec +from fontTools.misc import eexec import types from psOperators import * @@ -99,7 +99,7 @@ class PSTokenizer(StringIO.StringIO): self.pos = self.pos + 1 #self.skipwhite() self.dirtybuf = self.buf[self.pos:] - self.buf, R = eexec.Decrypt(self.dirtybuf, 55665) + self.buf, R = eexec.decrypt(self.dirtybuf, 55665) self.len = len(self.buf) self.pos = 4 diff --git a/Lib/fontTools/t1Lib.py b/Lib/fontTools/t1Lib.py index a2c63fbb4..c4a22612e 100644 --- a/Lib/fontTools/t1Lib.py +++ b/Lib/fontTools/t1Lib.py @@ -20,7 +20,7 @@ __author__ = "jvr" __version__ = "1.0b2" DEBUG = 0 -import eexec +from fontTools.misc import eexec import string import re import os @@ -68,11 +68,11 @@ class T1Font: lenIV = self.font["Private"].get("lenIV", 4) assert lenIV >= 0 for glyphName, charString in charStrings.items(): - charString, R = eexec.Decrypt(charString, 4330) + charString, R = eexec.decrypt(charString, 4330) charStrings[glyphName] = psCharStrings.T1CharString(charString[lenIV:]) subrs = self.font["Private"]["Subrs"] for i in range(len(subrs)): - charString, R = eexec.Decrypt(subrs[i], 4330) + charString, R = eexec.decrypt(subrs[i], 4330) subrs[i] = psCharStrings.T1CharString(charString[lenIV:]) del self.data @@ -246,7 +246,7 @@ def writeother(path, data, dohex = 0): code = 1 if code == 2 and dohex: while chunk: - f.write(eexec.hexstring(chunk[:hexlinelen])) + f.write(eexec.hexString(chunk[:hexlinelen])) f.write('\r') chunk = chunk[hexlinelen:] else: @@ -279,7 +279,7 @@ def decrypttype1(data): if isencrypted: if ishex(chunk[:4]): chunk = dehexstring(chunk) - decrypted, R = eexec.Decrypt(chunk, 55665) + decrypted, R = eexec.decrypt(chunk, 55665) decrypted = decrypted[4:] if decrypted[-len(EEXECINTERNALEND)-1:-1] <> EEXECINTERNALEND \ and decrypted[-len(EEXECINTERNALEND)-2:-2] <> EEXECINTERNALEND: @@ -309,7 +309,7 @@ def findencryptedchunks(data): return chunks def dehexstring(hexstring): - return eexec.dehexstring(string.join(string.split(hexstring), "")) + return eexec.deHexString(string.join(string.split(hexstring), "")) # Type 1 assertion