Skip to content

Commit 0dae195

Browse files
committed
Merge branch 'main' into update-name-length-check
2 parents e051253 + 2b130c8 commit 0dae195

11 files changed

+254
-127
lines changed

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
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-
## 1.0.1 (2025-May-??)
4+
## Upcoming release: 1.1.0 (2025-Jul-??)
55

66
### Changes to existing checks
77
### On the Universal profile
88
- **[name/family_and_style_max_length]:** Update to account for STAT table, along with recent testing and observations contributed to issue #2179
99

10-
## 1.0.0 (2025-May-07)
10+
## 1.0.1 (2025-Jul-04)
11+
### Bugfixes
12+
- fonttools==4.58.0 has been changed (PR #https://github.com/fonttools/fonttools/pull/3809/): It fixes duplicate names, therefore the test for the `unique_glyphnames`check was failing. (issue #5023)
13+
- Fix passing legacy check ids to --exclude-checkid (PR #5032)
14+
15+
### On the OpenType profile
16+
- **[check_monospace]:** Check CFF fonts as well: remove conditions "is_ttf" + remove "glyf" from required tables (issue #5030)
17+
18+
### On the Universal profile
19+
- **[base_has_width]** is no longer considered experimental.
20+
21+
22+
## 1.0.0 (2025-May-07)
1123
- See also: https://github.com/fonttools/fontspector
1224

1325
### Migration of checks

Lib/fontbakery/checkrunner.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,17 @@ def _run_check(self, identity: Identity):
238238

239239
@property
240240
def order(self) -> Tuple[Identity, ...]:
241+
# map old excluded check ids to new ones
242+
_exclude_checks = None
243+
if self._exclude_checks:
244+
_exclude_checks = []
245+
for excluded in self._exclude_checks:
246+
if excluded in old_to_new:
247+
self.legacy_checkid_references.add(excluded)
248+
_exclude_checks.append(old_to_new[excluded])
249+
else:
250+
_exclude_checks.append(excluded)
251+
241252
_order = []
242253
for section in self.profile.sections:
243254
for check in section.checks:
@@ -260,15 +271,13 @@ def order(self) -> Tuple[Identity, ...]:
260271
if not selected_via_legacy_checkid and not selected_via_new_checkid:
261272
continue
262273

263-
if self._exclude_checks:
264-
if any(excluded in check.id for excluded in self._exclude_checks):
274+
if _exclude_checks:
275+
if any(excluded in check.id for excluded in _exclude_checks):
265276
continue
266277

267278
if check.id in self.new_to_old:
268279
for legacy in self.new_to_old[check.id]:
269-
if any(
270-
excluded in legacy for excluded in self._exclude_checks
271-
):
280+
if any(excluded in legacy for excluded in _exclude_checks):
272281
self.legacy_checkid_references.add(legacy)
273282
continue
274283

Lib/fontbakery/checks/base_has_width.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def is_space(codepoint):
2727
Base characters should have non-zero advance width.
2828
""",
2929
proposal="https://github.com/fonttools/fontbakery/issues/4906",
30-
experimental="Since 2024/12/28",
3130
)
3231
def check_base_has_width(font, config):
3332
"""Check base characters have non-zero advance width."""

Lib/fontbakery/checks/interpolation_issues.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from fontTools.varLib.interpolatableHelpers import InterpolatableProblem
55
from fontTools.varLib.models import piecewiseLinearMap
66

7-
from fontbakery.prelude import check, Message, PASS, WARN
7+
from fontbakery.prelude import PASS, SKIP, WARN, Message, check
88
from fontbakery.utils import bullet_list
99

1010

@@ -25,6 +25,9 @@
2525
)
2626
def check_interpolation_issues(ttFont, config):
2727
"""Detect any interpolation issues in the font."""
28+
if "gvar" not in ttFont:
29+
yield SKIP, Message("interpolation-issues", "The font has no gvar table.")
30+
return
2831

2932
gvar = ttFont["gvar"]
3033
# This code copied from fontTools.varLib.interpolatable

Lib/fontbakery/checks/opentype/monospace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def PANOSE_expected(family_type):
6767

6868
@check(
6969
id="opentype/monospace",
70-
conditions=["glyph_metrics_stats", "is_ttf"],
70+
conditions=["glyph_metrics_stats"],
7171
rationale="""
7272
There are various metadata in the OpenType spec to specify if a font is
7373
monospaced or not. If the font is not truly monospaced, then no monospaced
@@ -118,7 +118,7 @@ def check_monospace(ttFont, glyph_metrics_stats):
118118

119119
# Check for missing tables before indexing them
120120
missing_tables = False
121-
required = ["glyf", "hhea", "hmtx", "OS/2", "post"]
121+
required = ["hhea", "hmtx", "OS/2", "post"]
122122
for key in required:
123123
if key not in ttFont:
124124
missing_tables = True

Lib/fontbakery/checks/opentype/varfont/STAT_axis_record_for_each_axis.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from fontbakery.prelude import check, Message, FAIL, PASS
1+
from fontbakery.prelude import FAIL, PASS, SKIP, Message, check
22
from fontbakery.utils import bullet_list
33

44

@@ -16,6 +16,10 @@
1616
def check_varfont_STAT_axis_record_for_each_axis(ttFont, config):
1717
"""All fvar axes have a correspondent Axis Record on STAT table?"""
1818
fvar_axes = set(a.axisTag for a in ttFont["fvar"].axes)
19+
if "STAT" not in ttFont:
20+
yield SKIP, Message("missing-axis-records", "The font has no STAT table.")
21+
return
22+
1923
STAT_axes = set(a.AxisTag for a in ttFont["STAT"].table.DesignAxisRecord.Axis)
2024
missing_axes = fvar_axes - STAT_axes
2125
if len(missing_axes) > 0:

0 commit comments

Comments
 (0)