Open m4rc1e opened 11 months ago
Using Cosimo's script, we get the following sizes:
gftools: 2kb, 1kb (zipped) fontmake: 369b, 438b (zipped)
I'll see what size I can get for the gftools if I remove the dependencies which are not used for generating fonts.
Actually, Idk if it's worth bothering trying to compress gftools more than just zipping it since the fonts we serve won't have this data. Are we able to spare 1kb?
of course you want either gftools or fontmake, not both, since fontmake is a dependency of gftools, you probably only want gftools' deps.
the dependencies which are not used for generating fonts.
you could place things in extras.. maybe the gftools builder should be in its own distribution..
Idk if it's worth bothering trying to compress
only if you care about retaining the data for shipping fonts, which I think we do not want
of course you want either gftools or fontmake, not both, since fontmake is a dependency of gftools, you probably only want gftools' deps.
The size results I've posted were done by running your gist on gftools and fontmake separately. the gftools dependencies will list fontmake. Personally, I'd prefer if we use the gftools deps since it includes vttLib, ttfautohinter etc so it'll make remaking the fonts much easier,
Idk if it's worth bothering trying to compress
only if you care about retaining the data for shipping fonts, which I think we do not want
Exactly so I'm tempted to leave it as is. Shall I go ahead and open a draft pr with a sketch?
I see no issue if we eventually move the builder to its own repo one day. We'll just get a more compact dependency list ;-)
I'm contemplating storing the build dependencies in every font's "meta" table. We have a situation where many designers haven't pinned the dependencies so we don't truly know what was used. By genning this table at build time, we can be certain of the dependencies.
I've just checked pyftsubset and it'll drop this table by default, which seems like something we'd want to do for this use case. I'd love the fonts in the google/fonts repo to have this table. I don't mind if the fonts on fonts.google.com don't have it.
I've talked about this idea with Cosimo but I'm interested in hearing from everyone else.
This idea has already been discussed in 2017, https://github.com/googlefonts/fontmake/issues/251.
In the next post, I'll workout how big this table will be using Cosimo's dependency lister, https://gist.github.com/anthrotype/531a425c8a0ba5ee975bc2ec8add7b82