Merge pull request #1458 from googlefonts/retain_gids

Insert empty widths into hdmx when retaining gids.
This commit is contained in:
Behdad Esfahbod 2019-01-18 20:47:36 -05:00 committed by GitHub
commit af0e78e2eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1730,6 +1730,9 @@ def subset_glyphs(self, s):
@_add_method(ttLib.getTableClass('hdmx')) @_add_method(ttLib.getTableClass('hdmx'))
def subset_glyphs(self, s): def subset_glyphs(self, s):
self.hdmx = {sz:_dict_subset(l, s.glyphs) for sz,l in self.hdmx.items()} self.hdmx = {sz:_dict_subset(l, s.glyphs) for sz,l in self.hdmx.items()}
for sz in self.hdmx:
for g in s.glyphs_emptied:
self.hdmx[sz][g] = 0
return bool(self.hdmx) return bool(self.hdmx)
@_add_method(ttLib.getTableClass('ankr')) @_add_method(ttLib.getTableClass('ankr'))