varLib: initialize all fields to None in new empty GDEF
code elsewhere assumes that all optional fields in OT tables are initialized to None (that is the case when decompiling from a file). This patch makes sure that the new GDEF table build by varLib when creating a new VF is properly initialised. Ideally we wouldn't have to do that manually, but the constructor would take care of that. But otData-generated classes are special...
This commit is contained in:
parent
9aa5407f31
commit
7209862e89
@ -597,9 +597,15 @@ def _merge_OTL(font, model, master_fonts, axisTags):
|
||||
GDEF = font['GDEF'].table
|
||||
assert GDEF.Version <= 0x00010002
|
||||
except KeyError:
|
||||
font['GDEF']= newTable('GDEF')
|
||||
font['GDEF'] = newTable('GDEF')
|
||||
GDEFTable = font["GDEF"] = newTable('GDEF')
|
||||
GDEF = GDEFTable.table = ot.GDEF()
|
||||
GDEF.GlyphClassDef = None
|
||||
GDEF.AttachList = None
|
||||
GDEF.LigCaretList = None
|
||||
GDEF.MarkAttachClassDef = None
|
||||
GDEF.MarkGlyphSetsDef = None
|
||||
|
||||
GDEF.Version = 0x00010003
|
||||
GDEF.VarStore = store
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user