[subset] Starting to implement pruning VarStores
Part of https://github.com/fonttools/fonttools/issues/1179
This commit is contained in:
parent
2d57c87a67
commit
3c717c7867
@ -1633,8 +1633,12 @@ def prune_post_subset(self, options):
|
|||||||
table.GlyphClassDef = None
|
table.GlyphClassDef = None
|
||||||
if table.AttachList and not table.AttachList.GlyphCount:
|
if table.AttachList and not table.AttachList.GlyphCount:
|
||||||
table.AttachList = None
|
table.AttachList = None
|
||||||
if (hasattr(table, "MarkGlyphSetsDef") and
|
if hasattr(table, "VarStore"):
|
||||||
table.MarkGlyphSetsDef and
|
if table.VarStore.VarDataCount == 0:
|
||||||
|
if table.Version == 0x00010003:
|
||||||
|
table.Version = 0x00010002
|
||||||
|
if (not hasattr(table, "MarkGlyphSetsDef") or
|
||||||
|
not table.MarkGlyphSetsDef or
|
||||||
not table.MarkGlyphSetsDef.Coverage):
|
not table.MarkGlyphSetsDef.Coverage):
|
||||||
table.MarkGlyphSetsDef = None
|
table.MarkGlyphSetsDef = None
|
||||||
if table.Version == 0x00010002:
|
if table.Version == 0x00010002:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user