Fix for subsetting HVAR tables that have an AdvanceWidthMap when the --retain-gid option is used. Needed to make subset_test.py::test_retain_gids_cff2 tests pass.
This commit is contained in:
parent
1cb9b81861
commit
635537604d
@ -1798,6 +1798,7 @@ def subset_glyphs(self, s):
|
||||
used = set()
|
||||
|
||||
if table.AdvWidthMap:
|
||||
if not s.options.retain_gids:
|
||||
table.AdvWidthMap.mapping = _dict_subset(table.AdvWidthMap.mapping, s.glyphs)
|
||||
used.update(table.AdvWidthMap.mapping.values())
|
||||
else:
|
||||
@ -1805,9 +1806,11 @@ def subset_glyphs(self, s):
|
||||
used.update(s.reverseOrigGlyphMap.values())
|
||||
|
||||
if table.LsbMap:
|
||||
if not s.options.retain_gids:
|
||||
table.LsbMap.mapping = _dict_subset(table.LsbMap.mapping, s.glyphs)
|
||||
used.update(table.LsbMap.mapping.values())
|
||||
if table.RsbMap:
|
||||
if not s.options.retain_gids:
|
||||
table.RsbMap.mapping = _dict_subset(table.RsbMap.mapping, s.glyphs)
|
||||
used.update(table.RsbMap.mapping.values())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user