[subset] Assert HVAR/VVAR case we do NOT handle

For now fixes https://github.com/fonttools/fonttools/issues/1179
This commit is contained in:
Behdad Esfahbod 2018-02-18 23:08:46 -08:00
parent 788a306e4a
commit e33ba6ddd6

View File

@ -1739,6 +1739,9 @@ def subset_glyphs(self, s):
def subset_glyphs(self, s):
table = self.table
# TODO Handle direct mapping
assert table.AdvWidthMap, "File a bug."
if table.AdvWidthMap:
table.AdvWidthMap.mapping = _dict_subset(table.AdvWidthMap.mapping, s.glyphs)
if table.LsbMap:
@ -1746,8 +1749,6 @@ def subset_glyphs(self, s):
if table.RsbMap:
table.RsbMap.mapping = _dict_subset(table.RsbMap.mapping, s.glyphs)
# TODO Handle direct mapping
return True
@_add_method(ttLib.getTableClass('HVAR'))
@ -1779,6 +1780,9 @@ def prune_post_subset(self, font, options):
def subset_glyphs(self, s):
table = self.table
# TODO Handle direct mapping
assert table.AdvHeightMap, "File a bug."
if table.AdvHeightMap:
table.AdvHeightMap.mapping = _dict_subset(table.AdvHeightMap.mapping, s.glyphs)
if table.TsbMap:
@ -1788,8 +1792,6 @@ def subset_glyphs(self, s):
if table.VOrgMap:
table.VOrgMap.mapping = _dict_subset(table.VOrgMap.mapping, s.glyphs)
# TODO Handle direct mapping
return True
@_add_method(ttLib.getTableClass('VVAR'))