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

Test a lot of builds #724

Open
rsheeter opened this issue Mar 4, 2024 · 2 comments
Open

Test a lot of builds #724

rsheeter opened this issue Mar 4, 2024 · 2 comments

Comments

@rsheeter
Copy link
Contributor

rsheeter commented Mar 4, 2024

@simoncozens has been doing work on automating builds across the collection that we can exploit to build and ttx_diff a lot of fonts. "build me a VF" is an operation (implemented here: https://github.com/googlefonts/gftools/blob/builder2/Lib/gftools/builder/operations/buildVariable.py). Replace that line with a fontc equivalent, and off we go.

This should enable us to test "all the fonts for which we have a known upstream repository and where there's a gftools-bulider configuration file in that repo." At time of writing that means 482 fonts out of 1603.

TODO: add end to end instructions to acquire and build as many google fonts as possible.

@simoncozens
Copy link
Contributor

Here is how I would do this:

  • https://github.com/simoncozens/gf-dashboard/blob/main/gfautobuilder.py is a driver script which clones each repo with a known upstream and runs gftools-builder on it.
    • It requires a cache file with information about which upstream repos seem like they can be built using gftools-builder.
    • You can download the cache file directly or you can generate it yourself with this script.
      • If you choose to generate the cache file yourself, the list-known-upstreams.py script in turn requires the googlefonts Python module in the same repo, it requires you to set GFDIR on line 13 to your google/fonts checkout directory, and also requires you to set the environment variable GITHUB_TOKEN to a valid authentication token.
  • Next you will need a version of gftools-builder which uses fontc instead of fontmake.
    • By the time you act on this, builder2 should be merged into the main branch, but in case it's not, start by checking out the builder2 branch of gftools.
    • Edit the files Lib/gftools/builder/operations/buildVariable.py, Lib/gftools/builder/operations/buildTTF.py and Lib/gftools/builder/operations/buildOTF.py, replacing the fontmake command line with the equivalent fontc command line. (The $fontmake_type variable means -g for Glyphs source, -m for designspace and -u for ufo; you don't need that font fontc.)
    • Install this modified gftools-builder into your Python environment; you now have a fontc-powered gftools-builder
  • Run gfautobuilder.py and watch the pretty error messages.

@rsheeter
Copy link
Contributor Author

Based on the comments in #852 I suggest we create a standalone (as in not part of the fontc repo) Rust tool that can do tricks like enumerate sources and stop using https://github.com/googlefonts/gf-dashboard/blob/main/list-known-upstreams.py. That would let us rig a nice "build all known GF sources" for fontc QA.

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

2 participants