fonttools / fontbakery

🧁 A font quality assurance tool for everyone
https://fontbakery.readthedocs.io
Apache License 2.0
546 stars 99 forks source link

Add GF profile METADATA check for designer string similarity #3317

Open davelab6 opened 3 years ago

davelab6 commented 3 years ago

Observed behaviour

https://fonts.google.com/?query=jik has 3 families

These should probably all have the same designer credit.

Expected behaviour

Add a fontbakery METADATA check that searches for existing designer strings and WARNs when similar ones are detected. I guess there are some simple python modules already published that can return string similarity, but perhaps a very simple one would be to count how many times each ordinal character is shared with existing strings, so the first character will likely always be shared with many others, but the 8th should very rarely be shared, and in the above case, a new designer JIKJITYPE would be shared by at least 3 others for the first 5 characters, so that is a strong match...

Resources and exact process needed to replicate

This might be another check that requires the entire GF git repo as a dependency, or a duplicate list of designer strings extracted from the repo into a fontbakery profile side file and updated from time to time, like the MSFT 4-char foundry code strings...

felipesanches commented 3 years ago

yeah, indeed the need for access to the entire repo (or some cached file derived form it) is what complicates this a bit. But I agree that it would be a nice check to have.

simoncozens commented 3 years ago

It looks like we're wanting to check the GF repo itself, rather than a font family; I think this needs a new googlefonts_repo profile or similar, and a new condition to pull down and cache the repo.

felipesanches commented 3 years ago

Not a new profile, but a new scope for checking, still in the same profile. By "scope" I mean that we have checks that work on these scopes nowadays:

All of those are implemented by a FB condition. I think we could have a new condition to facilitate working with the GF repo contents as well. But this should not mean the creation of a new profile, because profiles are defined by vendor needs instead of kinds of checks.