Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganization of profiles (deprecate UFO, Shaping and Outline profiles) #4812

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .github/workflows/install_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand All @@ -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
Expand Down
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
14 changes: 12 additions & 2 deletions Lib/fontbakery/checks/ufo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand All @@ -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."""
Expand All @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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"""
Expand Down
2 changes: 0 additions & 2 deletions Lib/fontbakery/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
"microsoft",
"notofonts",
"opentype",
"shaping",
"typenetwork",
"ufo",
"universal",
]

Expand Down
17 changes: 16 additions & 1 deletion Lib/fontbakery/profiles/googlefonts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROFILE = {
"include_profiles": ["universal", "outline", "shaping", "ufo"],
"include_profiles": ["universal"],
"sections": {
"Article Checks": [
"com.google.fonts/check/article/images",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 0 additions & 12 deletions Lib/fontbakery/profiles/outline.py

This file was deleted.

11 changes: 0 additions & 11 deletions Lib/fontbakery/profiles/shaping.py

This file was deleted.

19 changes: 0 additions & 19 deletions Lib/fontbakery/profiles/ufo.py

This file was deleted.

14 changes: 14 additions & 0 deletions Lib/fontbakery/profiles/universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is fine to include by default in my opinion. I would not expect any font project to want to have mixed curve types

It's just com.daltonmaag/check/no_open_corners that should be orphaned

# 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",
Expand Down
3 changes: 0 additions & 3 deletions docs/source/fontbakery/profiles/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@ profiles
fontbureau
fontwerk
fontval
ufo
iso15008
outline
shaping
5 changes: 0 additions & 5 deletions docs/source/fontbakery/profiles/outline.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/fontbakery/profiles/ufo.rst

This file was deleted.

Loading
Loading