Skip to content

Commit 01f606b

Browse files
committed
[ligature_carets] Don't error if the font has no GDEF table
1 parent eab6d90 commit 01f606b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/fontbakery/checks/ligature_carets.py

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ def check_ligature_carets(config, ttFont, ligature_glyphs):
4343
"""Are there caret positions declared for every ligature?"""
4444
if len(ligature_glyphs) == 0:
4545
yield SKIP, Message("no-ligatures", "No ligature glyphs found.")
46+
elif "GDEF" not in ttFont:
47+
yield WARN, Message(
48+
"lacks-caret-pos-gdef",
49+
"This font lacks caret position values"
50+
" for ligature glyphs because it has not GDEF table.",
51+
)
4652
else:
4753
lig_caret_list = ttFont["GDEF"].table.LigCaretList
4854
if lig_caret_list is None:

0 commit comments

Comments
 (0)