[instancer/CFF2] Minor sanity check
This commit is contained in:
parent
f6c72eabf9
commit
c9ed0d1348
@ -584,6 +584,9 @@ def instantiateCFF2(
|
|||||||
topDict = cff.topDictIndex[0]
|
topDict = cff.topDictIndex[0]
|
||||||
|
|
||||||
varStore = topDict.VarStore.otVarStore
|
varStore = topDict.VarStore.otVarStore
|
||||||
|
varStore2 = topDict.CharStrings.varStore.otVarStore
|
||||||
|
|
||||||
|
assert varStore is varStore2 # Who knows why it's in two places?!
|
||||||
|
|
||||||
def getNumRegions(vsindex):
|
def getNumRegions(vsindex):
|
||||||
return len(
|
return len(
|
||||||
@ -593,6 +596,7 @@ def instantiateCFF2(
|
|||||||
charStrings = topDict.CharStrings.values()
|
charStrings = topDict.CharStrings.values()
|
||||||
allCommands = []
|
allCommands = []
|
||||||
for cs in charStrings:
|
for cs in charStrings:
|
||||||
|
assert cs.private.vstore.otVarStore is varStore # Or in many places!!
|
||||||
commands = programToCommands(cs.program, getNumRegions=getNumRegions)
|
commands = programToCommands(cs.program, getNumRegions=getNumRegions)
|
||||||
if generalize:
|
if generalize:
|
||||||
commands = generalizeCommands(commands)
|
commands = generalizeCommands(commands)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user