From d00f179f5f18f0cedd712e28a926a0912fa0d8bd Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sun, 3 Mar 2024 08:33:31 +0000 Subject: [PATCH] Add rationale for a couple name checks on gfonts profile com.google.fonts/check/name/version_format com.google.fonts/check/name/mandatory_entries On the Google Fonts Profile. (PR #4570) --- CHANGELOG.md | 2 ++ Lib/fontbakery/checks/googlefonts/name.py | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ad656ba8..58a300de1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ A more detailed list of changes is available in the corresponding milestones for - **[com.google.fonts/check/metadata/menu_and_latin]:** Added rationale. (PR #4570) - **[com.google.fonts/check/metadata/copyright]:** Added rationale and improve display of detected inconsistencies. (PR #4570) - **[com.google.fonts/check/metadata/familyname]:** Added rationale and improve display of detected inconsistencies. (PR #4570) + - **[com.google.fonts/check/name/version_format]:** Added rationale. (PR #4570) + - **[com.google.fonts/check/name/mandatory_entries]:** Added rationale. (PR #4570) #### On the FontValidator profile - **[com.google.fonts/check/fontvalidator]:** Added rationale. (PR #4570) diff --git a/Lib/fontbakery/checks/googlefonts/name.py b/Lib/fontbakery/checks/googlefonts/name.py index abb3672fd7..590a143c20 100644 --- a/Lib/fontbakery/checks/googlefonts/name.py +++ b/Lib/fontbakery/checks/googlefonts/name.py @@ -72,7 +72,15 @@ def com_google_fonts_check_name_description_max_length(ttFont): ) -@check(id="com.google.fonts/check/name/version_format", proposal="legacy:check/055") +@check( + id="com.google.fonts/check/name/version_format", + proposal="legacy:check/055", + rationale=""" + For Google Fonts, the version string must be in the format "Version X.Y". + The version number must be greater than or equal to 1.000. (Additional + information following the numeric version number is acceptable.) + """, +) def com_google_fonts_check_name_version_format(ttFont): """Version format is correct in 'name' table?""" from fontbakery.utils import get_name_entry_strings @@ -273,6 +281,12 @@ def style_names(nametable): id="com.google.fonts/check/name/mandatory_entries", conditions=["style"], proposal="legacy:check/156", + rationale=""" + We require all fonts to have values for their font family name, + font subfamily name, full font name, and postscript name. For RIBBI + fonts, we also require values for the typographic family name and + typographic subfamily name. + """, ) def com_google_fonts_check_name_mandatory_entries(ttFont, style): """Font has all mandatory 'name' table entries?"""