Skip to content

Commit 86c5338

Browse files
authored
[opentype/monospace] Ensure check works with monospace OTF fonts
(PR #5051)
1 parent 8c5fadc commit 86c5338

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Below are the noteworthy changes from each release.
22
A more detailed list of changes is available in the corresponding milestones for each release in the Github issue tracker (https://github.com/googlefonts/fontbakery/milestones?state=closed).
33

4+
## Upcoming release v1.1.1 (2025-Oct-?)
5+
6+
### Changes to existing checks
7+
#### On the OpenType profile
8+
- **[opentype/monospace]**: Ensure check works with monospace OTF fonts (PR #5051)
9+
410
## 1.1.0 (2025-Oct-02)
511
- Replace deprecated `pkg_resources` by `importlib.resources` (issue #5028)
612

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)