This commit is contained in:
Kovid Goyal 2018-09-03 07:42:20 +05:30
parent db6d0dd2cb
commit 4777eeacef
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -29,6 +29,7 @@ real_nibbles = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'.', 'E', 'E-', None, '-']
real_nibbles_map = {x:i for i, x in enumerate(real_nibbles)}
class ByteCode(dict):
def read_byte(self, b0, data, index):
@ -119,6 +120,7 @@ class ByteCode(dict):
f = self.write_float if isinstance(value, float) else self.write_int
return f(value, encoding)
class Dict(ByteCode):
operand_encoding = cff_dict_operand_encoding
@ -235,6 +237,7 @@ class Dict(ByteCode):
last = v
return self.encode_array(out)
class TopDict(Dict):
TABLE = (
@ -281,6 +284,7 @@ class TopDict(Dict):
'UIDBase', 'Encoding', 'FDSelect', 'FDArray'}
OFFSETS = {'charset', 'Encoding', 'CharStrings', 'Private'}
class PrivateDict(Dict):
TABLE = (
@ -308,4 +312,3 @@ class PrivateDict(Dict):
)
OFFSETS = {'Subrs'}