Skip to content

Commit

Permalink
Update OFL URL
Browse files Browse the repository at this point in the history
New OFL website URL is expected, while the old one emits a WARN

com.google.fonts/check/name/license_url
On the Google Fonts Profile
(issue #4358)
  • Loading branch information
davelab6 authored and felipesanches committed Jan 12, 2024
1 parent 779cb06 commit cfcfe91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A more detailed list of changes is available in the corresponding milestones for

#### On the Google Fonts Profile
- **[com.google.fonts/check/metadata/valid_name_values]:** Compare METADATA family name against the font's best family name (issue #4262)
- **[com.google.fonts/check/name/license_url]:** New OFL website URL is expected, while the old one emits a WARN (issue #4358)

#### On the TypeNework Profile
- Updated including latest universal checks and improved writing of some rationales and log messages. (PR #4402)
Expand Down
18 changes: 14 additions & 4 deletions Lib/fontbakery/profiles/googlefonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ def com_google_fonts_check_license_OFL_body_text(license_contents):
name table:
- "This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is available with a FAQ at: https://scripts.sil.org/OFL"
This license is available with a FAQ at: openfontlicense.org"
- "Licensed under the Apache License, Version 2.0"
Expand Down Expand Up @@ -1532,7 +1532,7 @@ def com_google_fonts_check_name_license(ttFont, license_filename):
The string snippets used for detecting licensing terms are:
- "This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is available with a FAQ at: https://scripts.sil.org/OFL"
This license is available with a FAQ at: openfontlicense.org"
- "Licensed under the Apache License, Version 2.0"
Expand All @@ -1545,15 +1545,18 @@ def com_google_fonts_check_name_license(ttFont, license_filename):
When in doubt, please choose OFL for new font projects.
""",
conditions=["familyname"],
proposal="legacy:check/030",
proposal=[
"legacy:check/030",
"https://github.com/fonttools/fontbakery/issues/4358",
],
)
def com_google_fonts_check_name_license_url(ttFont, familyname):
"""License URL matches License text on name table?"""
from fontbakery.constants import PLACEHOLDER_LICENSING_TEXT

LEGACY_UFL_FAMILIES = ["Ubuntu", "UbuntuCondensed", "UbuntuMono"]
LICENSE_URL = {
"OFL.txt": "https://scripts.sil.org/OFL",
"OFL.txt": "https://openfontlicense.org",
"LICENSE.txt": "https://www.apache.org/licenses/LICENSE-2.0",
"UFL.txt": "https://www.ubuntu.com/legal/terms-and-policies/font-licence",
}
Expand Down Expand Up @@ -1618,6 +1621,13 @@ def com_google_fonts_check_name_license_url(ttFont, familyname):
string = "https://".join(string.split("http://"))
if string == expected:
found_good_entry = True
elif "scripts.sil.org/OFL" in string:
found_good_entry = True
yield WARN, Message(
"deprecated-ofl-url",
'OFL url is no longer "https://scripts.sil.org/OFL". '
"Use 'https://openfontlicense.org' instead.",
)
else:
passed = False
yield FAIL, Message(
Expand Down

0 comments on commit cfcfe91

Please sign in to comment.