Skip to content

Commit

Permalink
Add rationale for a couple name checks on gfonts profile
Browse files Browse the repository at this point in the history
com.google.fonts/check/name/version_format
com.google.fonts/check/name/mandatory_entries
On the Google Fonts Profile.

(PR #4570)
  • Loading branch information
simoncozens authored and felipesanches committed Mar 5, 2024
1 parent e18f50a commit d00f179
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 15 additions & 1 deletion Lib/fontbakery/checks/googlefonts/name.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?"""
Expand Down

0 comments on commit d00f179

Please sign in to comment.