Skip to content

Commit

Permalink
A sourceDescriptor.layerName can be "foreground" or "public.default" …
Browse files Browse the repository at this point in the history
…or None.

We don't want to use the foreground kerning for support layers, but we do want the kerning for foreground layers
  • Loading branch information
LettError committed Mar 24, 2020
1 parent 062a1c2 commit 2cf8d4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/ufoProcessor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,10 @@ def getKerningMutator(self, pairs=None):
if self._kerningMutator and pairs == self._kerningMutatorPairs:
return self._kerningMutator
kerningItems = []
foregroundLayers = [None, 'foreground', 'public.default']
if pairs is None:
for sourceDescriptor in self.sources:
if sourceDescriptor.layerName is not None:
if sourceDescriptor.layerName not in foregroundLayers:
continue
if not sourceDescriptor.muteKerning:
loc = Location(sourceDescriptor.location)
Expand Down

0 comments on commit 2cf8d4e

Please sign in to comment.