otConverters: BaseGlyphRecordCount and LayerRecordCount are 'propagated' counts

ie. they count things inside nested sub-tables
This commit is contained in:
Cosimo Lupo 2020-02-04 17:01:31 +00:00
parent 73b715732a
commit e56c0ee1a4
No known key found for this signature in database
GPG Key ID: 20D4A261E4A0E642

View File

@ -134,7 +134,22 @@ class BaseConverter(object):
self.tableClass = tableClass
self.isCount = name.endswith("Count") or name in ['DesignAxisRecordSize', 'ValueRecordSize']
self.isLookupType = name.endswith("LookupType") or name == "MorphType"
self.isPropagated = name in ["ClassCount", "Class2Count", "FeatureTag", "SettingsCount", "VarRegionCount", "MappingCount", "RegionAxisCount", 'DesignAxisCount', 'DesignAxisRecordSize', 'AxisValueCount', 'ValueRecordSize', 'AxisCount']
self.isPropagated = name in [
"ClassCount",
"Class2Count",
"FeatureTag",
"SettingsCount",
"VarRegionCount",
"MappingCount",
"RegionAxisCount",
"DesignAxisCount",
"DesignAxisRecordSize",
"AxisValueCount",
"ValueRecordSize",
"AxisCount",
"BaseGlyphRecordCount",
"LayerRecordCount",
]
def readArray(self, reader, font, tableDict, count):
"""Read an array of values from the reader."""