Skip to content

Commit

Permalink
Add a couple gfonts copyright rationales
Browse files Browse the repository at this point in the history
com.google.fonts/check/metadata/copyright_max_length
com.google.fonts/check/metadata/nameid/copyright
On the Google Fonts Profile.

(PR #4570)
  • Loading branch information
simoncozens authored and felipesanches committed Mar 5, 2024
1 parent b56ed7d commit 4a7d432
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ A more detailed list of changes is available in the corresponding milestones for
- **[com.google.fonts/check/metadata/nameid/family_and_full_names]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/match_name_familyname]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/canonical_weight_value]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/copyright_max_length]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/metadata/nameid/copyright]:** Added rationale. (PR #4570)

#### On the FontValidator profile
- **[com.google.fonts/check/fontvalidator]:** Added rationale. (PR #4570)
Expand Down
10 changes: 10 additions & 0 deletions Lib/fontbakery/checks/googlefonts/copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ def com_google_fonts_check_glyphs_file_font_copyright(glyphsFile):
id="com.google.fonts/check/metadata/copyright_max_length",
conditions=["font_metadata"],
proposal="legacy:check/104",
rationale="""
We check that the copyright notice within the METADATA.pb file is
not too long; if it is more than 500 characters, this may be an
indiciation that either a full license or the font's description
has been included in this field by mistake.
""",
)
def com_google_fonts_check_metadata_copyright_max_length(font_metadata):
"""METADATA.pb: Copyright notice shouldn't exceed 500 chars."""
Expand All @@ -113,6 +119,10 @@ def com_google_fonts_check_metadata_copyright_max_length(font_metadata):
id="com.google.fonts/check/metadata/nameid/copyright",
conditions=["font_metadata"],
proposal="legacy:check/155",
rationale="""
This check verifies that the copyright field in METADATA.pb matches the
contents of the name table nameID 0 (Copyright).
""",
)
def com_google_fonts_check_metadata_nameid_copyright(ttFont, font_metadata):
"""Copyright field for this font on METADATA.pb matches
Expand Down

0 comments on commit 4a7d432

Please sign in to comment.