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

Crater needs to run default and gftools mode #930

Open
rsheeter opened this issue Sep 4, 2024 · 4 comments
Open

Crater needs to run default and gftools mode #930

rsheeter opened this issue Sep 4, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@rsheeter
Copy link
Contributor

rsheeter commented Sep 4, 2024

#929 notes Oswald doesn't match in gftools mode. Crater currently won't notice.

@rsheeter rsheeter added the enhancement New feature or request label Sep 6, 2024
@cmyr
Copy link
Member

cmyr commented Oct 14, 2024

Okay so I've now had quite a bit of time to look into this, and it is naturally much more complicated than I had initially imagined. The main problem is that gftools is not simply an alternative set of flags & build options; it is a fairly complete build system of which the font compiler is merely a part. It is also very specifically designed to generate the binary font artifacts that google fonts will distribute for a given family. It is not a general purpose compiler or toolchain.

Given that our stated goal for fontc is to be able to function as a drop-in replacement for fontmake, I think it makes sense to define our goals for 'gftools mode' specifically in those terms: we want to be able to run gftools builder using both fontc and fontmake, and we want the whole pipeline to produce the same output for both compilers.

This means that we need to patch gftools to be able to optionally use fontc. There are more or less hacky ways to do this, but I think it would be simplest for the time being to just add a --use-fontc command-line flag.

It would also be nice if we could control a few other things about gftools builder; it would be nice if we could specify an alternative destination for the generated files (afaict gftools always writes the generated artifacts in place, alongside the sources... we can always just move them ourselves after execution I suppose?) and it would also be nice if we could override certain aspects of the config.yaml from the command line, so that we could (for instance) optionally skip things like generating instances for variable fonts, CFF outlines, or WOFF2 (at least for the time being).

To make this all work, we will also need to update ttx_diff.py so that instead of always driving the build process as well as the diffing, it could be passed a pair of font binaries and just do the diffing bit.

@rsheeter
Copy link
Contributor Author

Ref googlefonts/gftools#1046

@davelab6
Copy link
Member

davelab6 commented Oct 15, 2024

Aren't these already all features of gf builder?

@rsheeter
Copy link
Contributor Author

We need gftools to build with fontmake and with fontc so we can compare the results for https://googlefonts.github.io/fontc_crater/. It doesn't support that today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants