Don't fail during ValueRecord copy if src has more items
We drop hinting by simply changing ValueFormat, without cleaning up the actual ValueRecords. This was causing failure at this assert if font was subsetted without hinting and then passed to mutator.
This commit is contained in:
parent
3dbb7f763f
commit
d3a6a4e9e4
@ -894,7 +894,8 @@ class ValueRecord(object):
|
||||
setattr(self, name, None if isDevice else 0)
|
||||
if src is not None:
|
||||
for key,val in src.__dict__.items():
|
||||
assert hasattr(self, key)
|
||||
if not hasattr(self, key):
|
||||
continue
|
||||
setattr(self, key, val)
|
||||
elif src is not None:
|
||||
self.__dict__ = src.__dict__.copy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user