From e9a2f00efeb3c8c7a39bbeebb85873c16d58ffed Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 2 Mar 2024 21:27:31 +0000 Subject: [PATCH] Add some rationales for metadata checks 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) --- CHANGELOG.md | 3 +++ Lib/fontbakery/checks/googlefonts/metadata.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9e77d3b77..15f327b0ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Lib/fontbakery/checks/googlefonts/metadata.py b/Lib/fontbakery/checks/googlefonts/metadata.py index aa6ac48968..dc73c4b4ff 100644 --- a/Lib/fontbakery/checks/googlefonts/metadata.py +++ b/Lib/fontbakery/checks/googlefonts/metadata.py @@ -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?""" @@ -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.""" @@ -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?"""