[varLib.mutator] Drop GDEF is nothing left in it

Part of fixing https://github.com/fonttools/fonttools/pull/1079#issuecomment-338710803
This commit is contained in:
Behdad Esfahbod 2017-10-24 17:31:23 -04:00
parent 0b5a923ef8
commit 3fbc4688eb
3 changed files with 6 additions and 8 deletions

View File

@ -713,6 +713,12 @@ class MutatorMerger(AligningMerger):
if gdef.MarkGlyphSetsDef is None:
del gdef.MarkGlyphSetsDef
gdef.Version = 0x00010000
if not (gdef.LigCaretList or
gdef.MarkAttachClassDef or
gdef.GlyphClassDef or
gdef.AttachList or
(gdef.Version >= 0x00010002 and gdef.MarkGlyphSetsDef)):
del font['GDEF']
@MutatorMerger.merger(ot.Anchor)
def merge(merger, self, lst):

View File

@ -604,8 +604,4 @@
</extraNames>
</post>
<GDEF>
<Version value="0x00010000"/>
</GDEF>
</ttFont>

View File

@ -297,8 +297,4 @@
</extraNames>
</post>
<GDEF>
<Version value="0x00010000"/>
</GDEF>
</ttFont>