Skip to content

Commit

Permalink
Kern feature writer: Only use exported glyphs (#740)
Browse files Browse the repository at this point in the history
* Only use exported glyphs when forming the mark filtering set

* gdefClasses.mark returns None not [], awesome

* black
  • Loading branch information
simoncozens authored Apr 20, 2023
1 parent bab1f78 commit 0d2688c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/ufo2ft/featureWriters/kernFeatureWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ def _makeKerningLookup(self, name, ignoreMarks=True):
lookup = ast.LookupBlock(name)
if ignoreMarks and self.options.ignoreMarks:
# We only want to filter the spacing marks
marks = self.context.gdefClasses.mark
marks = set(self.context.gdefClasses.mark or []) & set(
self.context.glyphSet.keys()
)

spacing = []
if marks:
spacing = [mark for mark in marks if self.context.font[mark].width != 0]
Expand Down

0 comments on commit 0d2688c

Please sign in to comment.