-
Notifications
You must be signed in to change notification settings - Fork 71
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
Disable JSON structure when using fontc #1067
base: main
Are you sure you want to change the base?
Conversation
@cmyr With this I can build Noto fonts using fontc, except of course all the static generation is gone. |
8f99e62
to
9429896
Compare
With --experimental-fontc, building Noto Sans Arabic now takes 1m 52s on my machine, compared to 1m 24 without, presumably because of the slower UFO marshalling. I would be very interested in changing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you're finding this helpful! My only real desire with the fontc-supporting code is that it continues to support the needs of crater as well as it does now, which means really doing the minimal amount of work possible to get us the artifacts we're comparing, which are one generated binary per run. So long as we can continue doing that as needed, then this looks good.
Do ping me before publishing please just so I can do a quick crater run locally and make sure everything is working as expected, none of this fontc stuff is really tested in CI...
@@ -69,13 +69,10 @@ def modify_config(self, config: dict): | |||
extra_args = config.get("extraFontmakeArgs") or "" | |||
extra_args += " --no-production-names --drop-implied-oncurves" | |||
config["extraFontmakeArgs"] = extra_args | |||
# override config to turn not build instances if we're variable | |||
if self.will_build_variable_font(config): | |||
config["buildStatic"] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you accomplishing this another way, or are you building statics? The current fontc
mode is very much limited in focus to supporting the crater project, which lets us run both compilers and compare outputs, and I would like to avoid doing extra work in that case because it already takes quite a long time to run.
Maybe we could keep this, but have it be gated on the --fontc-experimental-single-source
argument?
Normally, gftools-builder uses a small optimisation - saving intermediate UFOs in ufoLib2's "JSON structure" which is faster to serialize and parse. However, we want to turn off this optimisation when running with
fontc
as it does not support this (undocumented, non-standard) UFO representation.