Merge pull request #1698 from khaledhosny/subset-ebdt-fix

[subset] Prune empty strikes in EBDT data
This commit is contained in:
Cosimo Lupo 2019-09-10 16:45:29 +02:00 committed by GitHub
commit 644d7e3b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1388,6 +1388,9 @@ def subset_glyphs(self, s):
def subset_glyphs(self, s):
self.strikeData = [{g: strike[g] for g in s.glyphs if g in strike}
for strike in self.strikeData]
# Prune empty strikes
# https://github.com/fonttools/fonttools/issues/1633
self.strikeData = list(filter(bool, self.strikeData))
return True
@_add_method(ttLib.getTableClass('sbix'))