[mtiLib] Disable lookupMap until we fix forward references

This commit is contained in:
Behdad Esfahbod 2015-12-15 12:08:55 +01:00
parent cba2220446
commit fd84ac769b

View File

@ -805,7 +805,7 @@ def parseLookup(lines, tableTag, font, lookupMap=None):
return lookup return lookup
def parseGSUBGPOS(lines, font, tableTag): def parseGSUBGPOS(lines, font, tableTag):
lookupMap = {} lookupMap = None#{} Until we support forward references...
featureMap = {} featureMap = {}
assert tableTag in ('GSUB', 'GPOS') assert tableTag in ('GSUB', 'GPOS')
debug("Parsing", tableTag) debug("Parsing", tableTag)
@ -837,8 +837,11 @@ def parseGSUBGPOS(lines, font, tableTag):
self.LookupList.Lookup = [] self.LookupList.Lookup = []
_, name, _ = lines.peek() _, name, _ = lines.peek()
lookup = parseLookup(lines, tableTag, font, lookupMap) lookup = parseLookup(lines, tableTag, font, lookupMap)
assert name not in lookupMap, "Duplicate lookup name: %s" % name if lookupMap:
lookupMap[name] = len(self.LookupList.Lookup) assert name not in lookupMap, "Duplicate lookup name: %s" % name
lookupMap[name] = len(self.LookupList.Lookup)
else:
assert int(name) == len(self.LookupList.Lookup), "%d %d" % (name, len(self.Lookup))
self.LookupList.Lookup.append(lookup) self.LookupList.Lookup.append(lookup)
else: else:
assert getattr(self, attr) is None, attr assert getattr(self, attr) is None, attr