Skip to content

Commit

Permalink
Add rationale for a couple font version checks
Browse files Browse the repository at this point in the history
com.google.fonts/check/family/equal_font_versions
com.google.fonts/check/font_version
On the Open Type Profile.

(PR #4570)
  • Loading branch information
simoncozens authored and felipesanches committed Mar 5, 2024
1 parent 403f474 commit e49d897
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ A more detailed list of changes is available in the corresponding milestones for
- **[com.adobe.fonts/check/fsselection_matches_macstyle]:** Improve log messages to include the bit values. (PR #4570)
- **[com.google.fonts/check/fsselection]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/family/equal_unicode_encodings]:** Added rationale, even though this is a questionable check, which we may simply deprecate, as we're not sure why would we expect what it checks. (PR #4570)
- **[com.google.fonts/check/family/equal_font_versions]:** Added rationale. (PR #4570)
- **[com.google.fonts/check/font_version]:** Added rationale. (PR #4570)


## 0.12.0a2 (2024-Feb-21)
Expand Down
19 changes: 17 additions & 2 deletions Lib/fontbakery/checks/opentype/head.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@


@check(
id="com.google.fonts/check/family/equal_font_versions", proposal="legacy:check/014"
id="com.google.fonts/check/family/equal_font_versions",
proposal="legacy:check/014",
rationale="""
Within a family released at the same time, all members of the family
should have the same version number in the head table.
""",
)
def com_google_fonts_check_family_equal_font_versions(ttFonts):
"""Make sure all font files have the same version value."""
Expand Down Expand Up @@ -109,7 +114,17 @@ def parse_version_string(name: str) -> float:
return fractions.Fraction(version_string.group(1))


@check(id="com.google.fonts/check/font_version", proposal="legacy:check/044")
@check(
id="com.google.fonts/check/font_version",
proposal="legacy:check/044",
rationale="""
The OpenType specification provides for two fields which contain
the version number of the font: fontRevision in the head table,
and nameID 5 in the name table. If these fields do not match,
different applications will report different version numbers for
the font.
""",
)
def com_google_fonts_check_font_version(ttFont):
"""Checking font version fields (head and name table)."""

Expand Down

0 comments on commit e49d897

Please sign in to comment.