From f7d17f1e4b0de8f0a72de5e7d378155b0b1b8931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Corr=C3=AAa=20da=20Silva=20Sanches?= Date: Thu, 5 Sep 2024 13:35:34 -0300 Subject: [PATCH] Migrate 'varfont/unsupported_axes' check from Google Fonts to Universal profile varfont/unsupported_axes: "Ensure VFs do not contain (yet) the ital axis." --- CHANGELOG.md | 1 + Lib/fontbakery/checks/varfont.py | 2 +- Lib/fontbakery/profiles/adobefonts.py | 1 + Lib/fontbakery/profiles/fontbureau.py | 1 + Lib/fontbakery/profiles/googlefonts.py | 2 -- Lib/fontbakery/profiles/microsoft.py | 1 + Lib/fontbakery/profiles/typenetwork.py | 1 + Lib/fontbakery/profiles/universal.py | 1 + tests/test_checks_varfont.py | 2 +- 9 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d805c1eeb..df80ea70c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ A more detailed list of changes is available in the corresponding milestones for - **[varfont/consistent_axes]**: "Ensure that all variable font files have the same set of axes and axis ranges." - **[varfont/duplexed_axis_reflow]**: "Ensure VFs with duplexed axes do not vary horizontal advance." - **[varfont/instances_in_order]**: ""Ensure the font's instances are in the correct order." + - **[varfont/unsupported_axes]**: "Ensure VFs do not contain (yet) the ital axis." - **[vttclean]**: "There must not be VTT Talk sources in the font." #### Moved from Fontwerk to Universal profile diff --git a/Lib/fontbakery/checks/varfont.py b/Lib/fontbakery/checks/varfont.py index 732d73be0d..9cb0f6d525 100644 --- a/Lib/fontbakery/checks/varfont.py +++ b/Lib/fontbakery/checks/varfont.py @@ -180,7 +180,7 @@ def check_varfont_duplexed_axis_reflow(font, ttFont, config): proposal="https://github.com/fonttools/fontbakery/issues/2866", ) def check_varfont_unsupported_axes(font): - """Ensure VFs do not contain the ital axis.""" + """Ensure VFs do not contain (yet) the ital axis.""" if font.ital_axis: yield FAIL, Message( "unsupported-ital", diff --git a/Lib/fontbakery/profiles/adobefonts.py b/Lib/fontbakery/profiles/adobefonts.py index a2a9ca6e28..8cd5e94d6f 100644 --- a/Lib/fontbakery/profiles/adobefonts.py +++ b/Lib/fontbakery/profiles/adobefonts.py @@ -85,6 +85,7 @@ "varfont/consistent_axes", "varfont/duplexed_axis_reflow", "varfont/instances_in_order", + "varfont/unsupported_axes", "vtt_volt_data", # very similar to vttclean, may be a good idea to merge them. "vttclean", ], diff --git a/Lib/fontbakery/profiles/fontbureau.py b/Lib/fontbakery/profiles/fontbureau.py index 8776229ed3..9c45b74f9f 100644 --- a/Lib/fontbakery/profiles/fontbureau.py +++ b/Lib/fontbakery/profiles/fontbureau.py @@ -31,6 +31,7 @@ "varfont/consistent_axes", "varfont/duplexed_axis_reflow", "varfont/instances_in_order", + "varfont/unsupported_axes", "vtt_volt_data", # very similar to vttclean, may be a good idea to merge them. "vttclean", ], diff --git a/Lib/fontbakery/profiles/googlefonts.py b/Lib/fontbakery/profiles/googlefonts.py index 69ffbf15a7..1da7cfdc2e 100644 --- a/Lib/fontbakery/profiles/googlefonts.py +++ b/Lib/fontbakery/profiles/googlefonts.py @@ -150,8 +150,6 @@ "googlefonts:version_bump", "googlefonts:vertical_metrics", "googlefonts:vertical_metrics_regressions", - # - "varfont/unsupported_axes", ], }, "configuration_defaults": { diff --git a/Lib/fontbakery/profiles/microsoft.py b/Lib/fontbakery/profiles/microsoft.py index ab14df7d00..2664e2b605 100644 --- a/Lib/fontbakery/profiles/microsoft.py +++ b/Lib/fontbakery/profiles/microsoft.py @@ -50,6 +50,7 @@ "varfont/consistent_axes", "varfont/duplexed_axis_reflow", "varfont/instances_in_order", + "varfont/unsupported_axes", "vttclean", # very similar to vtt_volt_data, may be a good idea to merge them. ], "sections": { diff --git a/Lib/fontbakery/profiles/typenetwork.py b/Lib/fontbakery/profiles/typenetwork.py index cff9e713d2..e67428a5ad 100644 --- a/Lib/fontbakery/profiles/typenetwork.py +++ b/Lib/fontbakery/profiles/typenetwork.py @@ -65,6 +65,7 @@ "ufo_unnecessary_fields", "varfont/duplexed_axis_reflow", "varfont/instances_in_order", + "varfont/unsupported_axes", "vtt_volt_data", # Very similar to 'vttclean' check, it may be a good idea to merge them. ], "sections": { diff --git a/Lib/fontbakery/profiles/universal.py b/Lib/fontbakery/profiles/universal.py index 932e5d1c74..9398d2695d 100644 --- a/Lib/fontbakery/profiles/universal.py +++ b/Lib/fontbakery/profiles/universal.py @@ -87,6 +87,7 @@ "varfont/consistent_axes", "varfont/duplexed_axis_reflow", "varfont/instances_in_order", + "varfont/unsupported_axes", "vtt_volt_data", # very similar to vttclean, may be a good idea to merge them. "vttclean", "whitespace_glyphnames", diff --git a/tests/test_checks_varfont.py b/tests/test_checks_varfont.py index a7e351d69d..08e18c1c10 100644 --- a/tests/test_checks_varfont.py +++ b/tests/test_checks_varfont.py @@ -46,7 +46,7 @@ def test_check_varfont_duplexed_axis_reflow(): def test_check_varfont_unsupported_axes(): - """Ensure VFs do not contain opsz or ital axes.""" + """Ensure VFs do not contain (yet) the ital axis.""" check = CheckTester("varfont/unsupported_axes") # Our reference varfont, CabinVFBeta.ttf, lacks 'ital' and 'slnt' variation axes.