-
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
NinjaBuilder
doesn't create instance TTFs, only makes (unwanted) instance UFOs
#849
Comments
@RickyDaMa Could you try out #726 please? we're hoping to merge it this week. |
Okay, looking at the
So now I can't specify my own instances? The workflow of creating a config, then doing Is there still a way with builder 2 to specify custom instances? |
Actually good point. Imo we should support all the features we had in the original builder. |
We should support the options from the original builder but I'm unconvinced about the use case of declaring certain instances in the font sources and asking the builder to generate completely different ones. Why is this a good idea? |
In this case, we have a wide designspace for which we want to build more static instances than we have named instances for in the variable font. (in particular, we are happy to have a less crowded set of instances in the variable font as the user can reach other areas with sliders manually, but for the statics this is not an option, and so we need to build more for a wider reach) As instances are shared for VFs and statics in a designspace, we can only store one set in a single source. There are workarounds we could deploy here (e.g. dynamically generating a second designspace) but we were interested to see if we could do it with only the gftools builder first :) |
OK, I'm on it... |
Thanks Simon, sorry for the hassle! There's no urgency here as we're going to re-use a handrolled approach we know works while we wait for builder2 to stabilise (before hopefully migrating to it) |
Example config:
With
GFBuilder
, this works as I expect:With the
NinjaBuilder
, the following happens:sources/instance_ufos
directory (unwanted)No errors in either case, but very different behaviour
I had a look why the
NinjaBuilder
wasn't producing static TTFs in the debugger and think I found why:gftools/Lib/gftools/builder/_ninja.py
Lines 303 to 321 in 6997cba
Here we can see that
NinjaBuilder.build_static
unconditionally generates instance UFOs, and then delegates toGFBuilder.build_static
, but overridingself
as theNinjaBuilder
gftools/Lib/gftools/builder/__init__.py
Lines 462 to 469 in 6997cba
GFBuilder
then delegates toself.instantiate_static_fonts
, butself
in this context isNinjaBuilder
, which...gftools/Lib/gftools/builder/_ninja.py
Lines 323 to 324 in 6997cba
Ah. Perhaps this was intended to be
GFBuilder.instantiate_static_fonts
, instead ofNinjaBuilder
's stub?This would be easy to workaround if there was a way to manually override the builder being used, but as far as I know there isn't, meaning I either have to change operating system or the source code to avoid the
NinjaBuilder
for nowThe text was updated successfully, but these errors were encountered: