diff --git a/.github/workflows/install_run.yml b/.github/workflows/install_run.yml index 7dcdf3a14c..847ada0adb 100644 --- a/.github/workflows/install_run.yml +++ b/.github/workflows/install_run.yml @@ -45,6 +45,16 @@ jobs: -x valid_default_instance_nameids -x soft_dotted data/test/source-sans-pro/VAR/SourceSansVariable-Roman.ttf + - description: Universal profile on a UFO font + extras: ".[ufo]" + name: universal + args: --verbose data/test/test.ufo + - description: Universal profile on a designspace + extras: ".[ufo]" + name: universal + args: >- + -x designspace_has_consistent + "data/test/stupidfont/Stupid Font.designspace" - description: OpenType profile on a TTC name: opentype args: >- @@ -68,20 +78,6 @@ jobs: name: adobefonts args: >- data/test/source-sans-pro/VAR/SourceSansVariable-Roman.ttf - - description: UFO profile - extras: ".[ufo]" - name: ufo - args: --verbose data/test/test.ufo - - description: UFO Profile on a designspace - extras: ".[ufo]" - name: ufo - args: >- - -x designspace_has_consistent - "data/test/stupidfont/Stupid Font.designspace" - - description: Shaping checks - extras: ".[shaping]" - name: shaping - args: data/test/mada/Mada-Regular.ttf - description: Google Fonts extras: ".[googlefonts]" name: googlefonts diff --git a/CHANGELOG.md b/CHANGELOG.md index c641ed726c..41fdad2a09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,23 @@ Below are the noteworthy changes from each release. 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). -## Upcoming release: 0.12.10 (2024-Jul-??) +## Upcoming release: 0.12.11 (2024-Aug-??) + - ... + + +## 0.12.10 (2024-Aug-09) +### Noteworthy code changes + - The **UFO** profile was removed and its checks were migrated to the **Universal** profile. For that reason, all of them received a temporary "experimental" flag (issue #4801) + - The **Shaping** and **Outline** profile were also removed and their checks migrated to the **Google Fonts** profile. As gfonts was already including those, and no other profile did so, there's no need to add experimental flags to these ones. (issue #4801) + ### Changes to existing checks - **EXPERIMENTAL - [com.daltonmaag/check/consistent_curve_type]:**: remove usage of `ufoLib2` APIs. (PR #4802) ### New checks -#### Added to the UFO profile +#### Added to the Universal profile - **EXPERIMENTAL - [com.daltonmaag/check/consistent_curve_type]:**: checks that a consistent curve type is used across the font sources as well as within glyphs. (PR #4795) - **EXPERIMENTAL - [com.daltonmaag/check/no_open_corners]:** checks that sources don't contain open corners, intended for use in font projects with a roundness axis. (PR #4808) + - And all other pre-existing UFO checks as well. ## 0.12.9 (2024-Jul-17) diff --git a/Lib/fontbakery/checks/ufo.py b/Lib/fontbakery/checks/ufo.py index 5e59e1c08b..d7e0f047cb 100644 --- a/Lib/fontbakery/checks/ufo.py +++ b/Lib/fontbakery/checks/ufo.py @@ -66,12 +66,13 @@ def designspace_sources(designspace): @check( id="com.daltonmaag/check/ufolint", - proposal="https://github.com/fonttools/fontbakery/pull/1736", rationale=""" ufolint is a tool that checks UFO source files for common issues. It is a good idea to run it before building a font to catch potential problems early in the process. """, + proposal="https://github.com/fonttools/fontbakery/pull/1736", + experimental="Since 2024/Aug/09", ) def com_daltonmaag_check_ufolint(ufo): """Run ufolint on UFO source directory.""" @@ -106,6 +107,7 @@ def com_daltonmaag_check_ufolint(ufo): unitsPerEm, ascender, descender, xHeight, capHeight and familyName. """, proposal="https://github.com/fonttools/fontbakery/pull/1736", + experimental="Since 2024/Aug/09", ) def com_daltonmaag_check_required_fields(ufo_font): """Check that required fields are present in the UFO fontinfo.""" @@ -137,6 +139,7 @@ def com_daltonmaag_check_required_fields(ufo_font): This includes fields that should be in any production font. """, proposal="https://github.com/fonttools/fontbakery/pull/1736", + experimental="Since 2024/Aug/09", ) def com_daltonmaag_check_recommended_fields(ufo_font): """Check that recommended fields are present in the UFO fontinfo.""" @@ -176,6 +179,7 @@ def com_daltonmaag_check_recommended_fields(ufo_font): year is deprecated since UFO v2. """, proposal="https://github.com/fonttools/fontbakery/pull/1736", + experimental="Since 2024/Aug/09", ) def com_daltonmaag_check_unnecessary_fields(ufo_font): """Check that no unnecessary fields are present in the UFO fontinfo.""" @@ -215,6 +219,7 @@ def com_daltonmaag_check_unnecessary_fields(ufo_font): can be properly parsed and does include valid source file references. """, proposal="https://github.com/fonttools/fontbakery/pull/3168", + experimental="Since 2024/Aug/09", ) def com_google_fonts_check_designspace_has_sources(designspace_sources): """See if we can actually load the source files.""" @@ -230,6 +235,7 @@ def com_google_fonts_check_designspace_has_sources(designspace_sources): We expect that designspace files declare on of the masters as default. """, proposal="https://github.com/fonttools/fontbakery/pull/3168", + experimental="Since 2024/Aug/09", ) def com_google_fonts_check_designspace_has_default_master(designSpace): """Ensure a default master is defined.""" @@ -247,6 +253,7 @@ def com_google_fonts_check_designspace_has_default_master(designSpace): """, conditions=["designspace_sources"], proposal="https://github.com/fonttools/fontbakery/pull/3168", + experimental="Since 2024/Aug/09", ) def com_google_fonts_check_designspace_has_consistent_glyphset(designSpace, config): """Check consistency of glyphset in a designspace file.""" @@ -280,6 +287,7 @@ def com_google_fonts_check_designspace_has_consistent_glyphset(designSpace, conf """, conditions=["designspace_sources"], proposal="https://github.com/fonttools/fontbakery/pull/3168", + experimental="Since 2024/Aug/09", ) def com_google_fonts_check_designspace_has_consistent_codepoints(designSpace, config): """Check codepoints consistency in a designspace file.""" @@ -329,6 +337,7 @@ def com_google_fonts_check_designspace_has_consistent_codepoints(designSpace, co http://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#4b-language-system """, proposal="https://github.com/googlefonts/fontbakery/issues/4011", + experimental="Since 2024/Aug/09", ) def com_thetypefounders_check_features_default_languagesystem(ufo_font): """Check that languagesystem DFLT dflt is present in the features.fea file.""" @@ -361,8 +370,8 @@ def com_thetypefounders_check_features_default_languagesystem(ufo_font): build pipeline unless specifically configured to account for this. """, conditions=["ufo_font"], - experimental="Since 2024/Jul/17", proposal="https://github.com/fonttools/fontbakery/pull/4795", + experimental="Since 2024/Jul/17", ) def check_consistent_curve_type(config, ufo: Ufo): """Check that all glyphs across the source use the same curve type""" @@ -419,6 +428,7 @@ def check_consistent_curve_type(config, ufo: Ufo): """, conditions=["ufo_font"], proposal="https://github.com/fonttools/fontbakery/pull/4808", + experimental="Since 2024/Aug/09", ) def check_no_open_corners(config, ufo): """Check the sources have no corners""" diff --git a/Lib/fontbakery/cli.py b/Lib/fontbakery/cli.py index c1139e5757..c75bafe926 100644 --- a/Lib/fontbakery/cli.py +++ b/Lib/fontbakery/cli.py @@ -45,9 +45,7 @@ "microsoft", "notofonts", "opentype", - "shaping", "typenetwork", - "ufo", "universal", ] diff --git a/Lib/fontbakery/profiles/googlefonts.py b/Lib/fontbakery/profiles/googlefonts.py index 4b84dd4b73..65f97d36b8 100644 --- a/Lib/fontbakery/profiles/googlefonts.py +++ b/Lib/fontbakery/profiles/googlefonts.py @@ -1,5 +1,5 @@ PROFILE = { - "include_profiles": ["universal", "outline", "shaping", "ufo"], + "include_profiles": ["universal"], "sections": { "Article Checks": [ "com.google.fonts/check/article/images", @@ -101,6 +101,21 @@ "com.google.fonts/check/repo/vf_has_static_fonts", "com.google.fonts/check/repo/zip_files", ], + "Shaping Checks": [ + "com.google.fonts/check/shaping/regression", + "com.google.fonts/check/shaping/forbidden", + "com.google.fonts/check/shaping/collides", + "com.google.fonts/check/dotted_circle", + "com.google.fonts/check/soft_dotted", + ], + "Outline Checks": [ + "com.google.fonts/check/outline_alignment_miss", + "com.google.fonts/check/outline_short_segments", + "com.google.fonts/check/outline_colinear_vectors", + "com.google.fonts/check/outline_jaggy_segments", + "com.google.fonts/check/outline_semi_vertical", + "com.google.fonts/check/outline_direction", + ], "Font File Checks": [ "com.google.fonts/check/aat", "com.google.fonts/check/canonical_filename", diff --git a/Lib/fontbakery/profiles/outline.py b/Lib/fontbakery/profiles/outline.py deleted file mode 100644 index 47e2fcc62a..0000000000 --- a/Lib/fontbakery/profiles/outline.py +++ /dev/null @@ -1,12 +0,0 @@ -PROFILE = { - "sections": { - "Outline Checks": [ - "com.google.fonts/check/outline_alignment_miss", - "com.google.fonts/check/outline_short_segments", - "com.google.fonts/check/outline_colinear_vectors", - "com.google.fonts/check/outline_jaggy_segments", - "com.google.fonts/check/outline_semi_vertical", - "com.google.fonts/check/outline_direction", - ] - } -} diff --git a/Lib/fontbakery/profiles/shaping.py b/Lib/fontbakery/profiles/shaping.py deleted file mode 100644 index d1e31c87f3..0000000000 --- a/Lib/fontbakery/profiles/shaping.py +++ /dev/null @@ -1,11 +0,0 @@ -PROFILE = { - "sections": { - "Shaping Checks": [ - "com.google.fonts/check/shaping/regression", - "com.google.fonts/check/shaping/forbidden", - "com.google.fonts/check/shaping/collides", - "com.google.fonts/check/dotted_circle", - "com.google.fonts/check/soft_dotted", - ] - } -} diff --git a/Lib/fontbakery/profiles/ufo.py b/Lib/fontbakery/profiles/ufo.py deleted file mode 100644 index 2f61f444d5..0000000000 --- a/Lib/fontbakery/profiles/ufo.py +++ /dev/null @@ -1,19 +0,0 @@ -PROFILE = { - "name": "UFO Sources", - "sections": { - "UFO Sources": [ - # FIXME (orphan check): "com.daltonmaag/check/consistent_curve_type", - # https://github.com/fonttools/fontbakery/pull/4809 - "com.google.fonts/check/designspace_has_sources", - "com.google.fonts/check/designspace_has_default_master", - "com.google.fonts/check/designspace_has_consistent_glyphset", - "com.google.fonts/check/designspace_has_consistent_codepoints", - "com.thetypefounders/check/features_default_languagesystem", - # FIXME (orphan check): "com.daltonmaag/check/no_open_corners", - "com.daltonmaag/check/ufolint", - "com.daltonmaag/check/ufo_required_fields", - "com.daltonmaag/check/ufo_recommended_fields", - "com.daltonmaag/check/ufo_unnecessary_fields", - ] - }, -} diff --git a/Lib/fontbakery/profiles/universal.py b/Lib/fontbakery/profiles/universal.py index 30f3f0f59f..45bb37f7f4 100644 --- a/Lib/fontbakery/profiles/universal.py +++ b/Lib/fontbakery/profiles/universal.py @@ -5,6 +5,20 @@ "com.google.fonts/check/superfamily/list", "com.google.fonts/check/superfamily/vertical_metrics", ], + "UFO Sources": [ + # FIXME (orphan check): "com.daltonmaag/check/consistent_curve_type", + # https://github.com/fonttools/fontbakery/pull/4809 + "com.google.fonts/check/designspace_has_sources", + "com.google.fonts/check/designspace_has_default_master", + "com.google.fonts/check/designspace_has_consistent_glyphset", + "com.google.fonts/check/designspace_has_consistent_codepoints", + "com.thetypefounders/check/features_default_languagesystem", + # FIXME (orphan check): "com.daltonmaag/check/no_open_corners", + "com.daltonmaag/check/ufolint", + "com.daltonmaag/check/ufo_required_fields", + "com.daltonmaag/check/ufo_recommended_fields", + "com.daltonmaag/check/ufo_unnecessary_fields", + ], "Universal Profile Checks": [ "com.google.fonts/check/alt_caron", "com.google.fonts/check/arabic_high_hamza", diff --git a/docs/source/fontbakery/profiles/index.rst b/docs/source/fontbakery/profiles/index.rst index 8a05cff675..46429e25b4 100644 --- a/docs/source/fontbakery/profiles/index.rst +++ b/docs/source/fontbakery/profiles/index.rst @@ -13,7 +13,4 @@ profiles fontbureau fontwerk fontval - ufo iso15008 - outline - shaping diff --git a/docs/source/fontbakery/profiles/outline.rst b/docs/source/fontbakery/profiles/outline.rst deleted file mode 100644 index 54ed358958..0000000000 --- a/docs/source/fontbakery/profiles/outline.rst +++ /dev/null @@ -1,5 +0,0 @@ -####### -Outline -####### - -.. autoprofile:: fontbakery.profiles.outline diff --git a/docs/source/fontbakery/profiles/ufo.rst b/docs/source/fontbakery/profiles/ufo.rst deleted file mode 100644 index 72a1fbf8b2..0000000000 --- a/docs/source/fontbakery/profiles/ufo.rst +++ /dev/null @@ -1,5 +0,0 @@ -### -UFO -### - -.. autoprofile:: fontbakery.profiles.ufo diff --git a/pyproject.toml b/pyproject.toml index c600bd8b3b..32616a4cc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,23 +28,26 @@ maintainers = [ ] dependencies = [ - "fontTools >= 4.46.0", + "beziers >= 0.6.0, == 0.6.*", + "cmarkgfm >= 0.4", + "defcon", + "fontTools[ufo] >= 4.46.0", "freetype-py < 2.4.0", # see: https://github.com/fonttools/fontbakery/issues/4143 + "Jinja2 >= 3.0.0", # issue #4717 + "munkres", "opentypespec", "opentype-sanitizer >= 9.1.0, == 9.*", - "munkres", - "PyYAML", - "toml", - "cmarkgfm >= 0.4", - "rich", - "Jinja2 >= 3.0.0", # issue #4717 "packaging >= 14.5", # VERSION_PATTERN was added on v14.5 (fontbakery/issues/4792) "pip-api", + "PyYAML", "requests >= 2.19", # issue #4718 - "beziers >= 0.6.0, == 0.6.*", + "rich", + "toml", + "typing_extensions ; python_version < '3.11'", + "ufolint", + "ufo2ft >= 2.25.2", # script lists for Unicode 14.0 were updated on v2.25.2 "uharfbuzz", "vharfbuzz >= 0.2.0", - "typing_extensions ; python_version < '3.11'", ] [project.optional-dependencies] @@ -68,11 +71,6 @@ shaperglot = [ # for other deps such as protobuf, making it harder satisfy all dependencies. ] -ufo2ft = [ - "ufo2ft >= 2.25.2", - # 2.25.2 updated the script lists for Unicode 14.0 -] - # These Google Fonts profile dependencies contain data that is critical to # always be up-to-date, so we treat any update to these deps the same way we would # deal with API-breaking updates. Only the latest released version is acceptable: @@ -104,6 +102,10 @@ fontwerk = [ ] googlefonts = [ + "collidoscope >= 0.5.2", + # 0.5.2 added Python 3.11 wheels + # (see https://github.com/fonttools/fontbakery/issues/3970) + "dehinter >= 3.1.0", # 3.1.0 added dehinter.font.hint function @@ -115,12 +117,13 @@ googlefonts = [ # We cannot use v4 because our protobuf files have been compiled with v3. # (see https://github.com/fonttools/fontbakery/issues/2200) + "stringbrewer", + "unicodedata2", "fontbakery[beautifulsoup4]", "fontbakery[googlefontsalwayslatest]", - "fontbakery[shaping]", - "fontbakery[ufo]", + "fontbakery[shaperglot]", ] iso15008 = [] @@ -131,35 +134,13 @@ notofonts = [ "fontbakery[googlefonts]", ] -# FIXME: This is not a vendor-specific profile! -shaping = [ - "collidoscope >= 0.5.2", - # 0.5.2 added Python 3.11 wheels - # (see https://github.com/fonttools/fontbakery/issues/3970) - - "stringbrewer", - - "fontbakery[ufo2ft]", - "fontbakery[shaperglot]", -] - typenetwork = [ "unicodedata2", "fontbakery[beautifulsoup4]", - "fontbakery[ufo2ft]", "fontbakery[shaperglot]", ] -# FIXME: This is not a vendor-specific profile! -ufo = [ - "defcon", - "fonttools[ufo]", - "ufolint", - - "fontbakery[ufo2ft]", -] - # Dependencies for building our documentation: @@ -181,9 +162,7 @@ all = [ "fontbakery[googlefonts]", "fontbakery[iso15008]", "fontbakery[notofonts]", - "fontbakery[shaping]", "fontbakery[typenetwork]", - "fontbakery[ufo]", ] diff --git a/tests/commands/test_usage.py b/tests/commands/test_usage.py index c986db5902..f55ee97cf6 100644 --- a/tests/commands/test_usage.py +++ b/tests/commands/test_usage.py @@ -48,7 +48,7 @@ def test_command_check_googlefonts(): [ "check-profile", "check-opentype", - "check-ufo", + "check-universal", ], ) def test_command_check_profile(subcommand):