Skip to content

Commit

Permalink
Add some rationales for metadata checks
Browse files Browse the repository at this point in the history
com.google.fonts/check/metadata/broken_links
com.google.fonts/check/metadata/menu_and_latin
com.google.fonts/check/metadata/copyright
On the Google Fonts Profile.

(PR #4570)
  • Loading branch information
simoncozens authored and felipesanches committed Mar 5, 2024
1 parent 84dbb5a commit e9a2f00
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ A more detailed list of changes is available in the corresponding milestones for
### Changes to existing checks
#### On the Google Fonts profile
- **[com.google.fonts/check/metadata/has_tags]:** Also fetch family tagging data from a second Google Sheet (Submissions from designers via form: https://forms.gle/jcp3nDv63LaV1rxH6) (PR #4576)
- **[com.google.fonts/check/metadata/broken_links]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/menu_and_latin]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/copyright]:** Added rationale. (PR #4570)

#### On the Universal profile
- **DISABLED - [com.google.fonts/check/legacy_accents]:** This is one of the checks that we probably should run on the sources instead of binaries. (https://github.com/fonttools/fontbakery/issues/3959#issuecomment-1822913547)
Expand Down
13 changes: 13 additions & 0 deletions Lib/fontbakery/checks/googlefonts/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def com_google_fonts_check_metadata_designer_values(family_metadata):
"https://github.com/fonttools/fontbakery/issues/2550",
"https://github.com/fonttools/fontbakery/issues/4110",
],
rationale="""
This check ensures that any URLs found within the copyright
field of the METADATA.pb file are valid.
""",
)
def com_google_fonts_check_metadata_broken_links(family_metadata):
"""Does METADATA.pb copyright field contain broken links?"""
Expand Down Expand Up @@ -313,6 +317,10 @@ def com_google_fonts_check_metadata_category(family_metadata):
"legacy:check/086",
"https://github.com/fonttools/fontbakery/issues/912#issuecomment-237935444",
],
rationale="""
The 'menu' and 'latin' subsets are mandatory in METADATA.pb for the
font to display correctly on the Google Fonts website.
""",
)
def com_google_fonts_check_metadata_menu_and_latin(family_metadata):
"""METADATA.pb should contain at least "menu" and "latin" subsets."""
Expand Down Expand Up @@ -392,6 +400,11 @@ def com_google_fonts_check_metadata_includes_production_subsets(
id="com.google.fonts/check/metadata/copyright",
conditions=["family_metadata"],
proposal="legacy:check/088",
rationale="""
The METADATA.pb file includes a copyright field for each font
file in the family. The value of this field should be the same
for all fonts in the family.
""",
)
def com_google_fonts_check_metadata_copyright(family_metadata):
"""METADATA.pb: Copyright notice is the same in all fonts?"""
Expand Down

0 comments on commit e9a2f00

Please sign in to comment.