Skip to content

Commit

Permalink
Use basefilter directly
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Jul 16, 2021
1 parent 1637a0f commit c3660cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lib/ufo2ft/filters/optimizeAnchors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from ufo2ft.filters.transformations import TransformationsFilter
from ufo2ft.filters import BaseFilter
from fontTools.misc.transform import Identity, Transform
import logging

Expand All @@ -7,8 +8,9 @@

class OptimizeAnchorsFilter(TransformationsFilter):
def set_context(self, font, glyphSet):
# Skip over transformations filter to base filter
return super(TransformationsFilter, self).set_context(font, glyphSet)
self.context = BaseFilter.set_context(self, font, glyphSet)

return self.context

def filter(self, glyph):
if len(glyph.anchors) == 0 or any(
Expand Down

0 comments on commit c3660cb

Please sign in to comment.