Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[com.google.fonts/check/name/license_url] https://openfontlicense.org is not recognized as the OFL’s URL #4418

Closed
dscorbett opened this issue Jan 13, 2024 · 6 comments

Comments

@dscorbett
Copy link
Member

Observed behavior

com.google.fonts/check/name/license_url warns if a font uses the OFL’s old URL but skips if the font is modified to use the OFL’s new URL.

With the old URL:

     WARN OFL url is no longer "https://scripts.sil.org/OFL".                   
          Use 'https://openfontlicense.org' instead. [code: deprecated-ofl-url] 

With the new URL:

     SKIP Could not infer the font license. Please ensure                       
          NameID 13 (LICENSE DESCRIPTION) is properly set.                      

Expected behavior

com.google.fonts/check/name/license_url passes if a font uses the OFL’s new URL.

Resources and steps needed to reproduce

pip install fontbakery==0.10.9
curl -O https://www.ponomar.net/files/Vilnius.zip
unzip Vilnius.zip
ttx -t name Vilnius-Regular.otf
sed -i.bak 's|https://scripts.sil.org/OFL|https://openfontlicense.org|' Vilnius-Regular.ttx
ttx -m Vilnius-Regular.otf Vilnius-Regular.ttx
fontbakery check-googlefonts -c com.google.fonts/check/name/license_url Vilnius-Regular.otf
fontbakery check-googlefonts -c com.google.fonts/check/name/license_url -l SKIP Vilnius-Regular#1.otf
@felipesanches
Copy link
Collaborator

Today I've been working on this one. I think the entire check needs to be reimplemented. The check should be smarter to detect the intended license (by having both name IDs 13 and 14 as well as any license file as source of truth). And only after detecting the most likely user intent, then reporting WARNs or FAILs that are meaningful to the user.

The check should also have tests, which is currently lacks.

I'm working on both aspects and will soon send a PR.

@vv-monsalve
Copy link
Collaborator

And only after detecting the most likely user intent, then reporting WARNs or FAILs that are meaningful to the user.

I'm having trouble understanding what you mean by "most likely user intent" in regard to this check's smartness.

@felipesanches felipesanches modified the milestones: 0.11.0, 0.11.x, 0.12.x Feb 2, 2024
@simoncozens
Copy link
Collaborator

This must be fixed before #4072.

@vv-monsalve
Copy link
Collaborator

The check should be smarter to detect the intended license (by having both name IDs 13 and 14 as well as any license file as source of truth)

Fontbakery should detect license URL consistency in those three sources and report a Fail if there is a mismatch. This is being ignored. See an example in this PR

@felipesanches felipesanches modified the milestones: 0.12.x, 0.12.0 Mar 27, 2024
@simoncozens
Copy link
Collaborator

@felipesanches This is a symptom of a more general problem. When we think of some new thing which needs checking, our response is normally to add another check for it. This means we have a large number of small, discrete checks, which individually are easy to understand and reason about but which don't necessarily "communicate" with one another. I would prefer to move towards a smaller number of checks which tell you everything about a particular topic - i.e. license URLS in all the different places they can appear - because then they can ensure consistency together.

@felipesanches felipesanches modified the milestones: 0.12.0, 0.12.1, 0.12.2, 0.12.x Apr 12, 2024
@dscorbett
Copy link
Member Author

This was fixed in version 0.11.0 by #4437.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants