Skip to content

Commit

Permalink
subset: don't try subsetting ClipList if None
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Oct 11, 2021
1 parent 6df6db8 commit 5c54f4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/fontTools/subset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,8 +2089,9 @@ def subset_glyphs(self, s):
)
del self.ColorLayersV1

clips = self.table.ClipList.clips
self.table.ClipList.clips = {g: clips[g] for g in clips if g in s.glyphs}
if self.table.ClipList is not None:
clips = self.table.ClipList.clips
self.table.ClipList.clips = {g: clips[g] for g in clips if g in s.glyphs}

layersV0 = self.ColorLayers
if not self.table.BaseGlyphList.BaseGlyphPaintRecord:
Expand Down

0 comments on commit 5c54f4e

Please sign in to comment.