Skip to content

Commit

Permalink
fix ERROR on check/unreachable_glyphs
Browse files Browse the repository at this point in the history
Be sure we have a LayerList before attempting to access it.

com.google.fonts/check/unreachable_glyphs
On Shaping profile.

(issue #4786)
  • Loading branch information
felipesanches committed Jul 17, 2024
1 parent 1423749 commit 7ae186d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ A more detailed list of changes is available in the corresponding milestones for
#### On the Universal profile
- **[com.google.fonts/check/gsub/smallcaps_before_ligatures]:** Skip check if font lacks GSUB table or font is missing either liga or smcp features. (PR #4787)

#### On the Shaping profile
- **[com.google.fonts/check/unreachable_glyphs]:** Fix ERROR by being sure that we have a LayerList before attempting to access it. (issue #4786)


## 0.12.8 (2024-Jul-05)
### Noteworthy code-changes
Expand Down
7 changes: 4 additions & 3 deletions Lib/fontbakery/checks/universal/glyphset.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ def remove_lookup_outputs(all_glyphs, lookup):
if hasattr(paint_record.Paint, "Glyph"):
all_glyphs.discard(paint_record.Paint.Glyph)

for paint in ttFont["COLR"].table.LayerList.Paint:
if hasattr(paint, "Glyph"):
all_glyphs.discard(paint.Glyph)
if ttFont["COLR"].table.LayerList:
for paint in ttFont["COLR"].table.LayerList.Paint:
if hasattr(paint, "Glyph"):
all_glyphs.discard(paint.Glyph)

if "GSUB" in ttFont and ttFont["GSUB"].table.LookupList:
lookups = ttFont["GSUB"].table.LookupList.Lookup
Expand Down

0 comments on commit 7ae186d

Please sign in to comment.