Skip to content

Commit 5fa3df9

Browse files
committed
Ensure opentype/monospace works with monospace OTF fonts
1 parent 8c5fadc commit 5fa3df9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/fontbakery/checks/opentype/monospace.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ def check_monospace(ttFont, glyph_metrics_stats):
166166
f"{PANOSE_expected(family_type)}",
167167
)
168168

169-
num_glyphs = len(ttFont["glyf"].glyphs)
169+
glyph_names = ttFont.getGlyphNames()
170+
num_glyphs = len(glyph_names)
170171
unusually_spaced_glyphs = [
171172
g
172-
for g in ttFont["glyf"].glyphs
173+
for g in glyph_names
173174
if g not in [".notdef", ".null", "NULL"]
174175
and ttFont["hmtx"].metrics[g][0] != 0
175176
and ttFont["hmtx"].metrics[g][0] != most_common_width

0 commit comments

Comments
 (0)