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

[builder] expandFeaturesToInstances not working #1039

Open
arrowtype opened this issue Oct 3, 2024 · 2 comments
Open

[builder] expandFeaturesToInstances not working #1039

arrowtype opened this issue Oct 3, 2024 · 2 comments

Comments

@arrowtype
Copy link
Contributor

In #558, it was reported that features weren’t expanding into instances, which meant that feature includes weren’t working. This seems to have been closed by #617.

However, I’m now experiencing the original issue – even when I add expandFeaturesToInstances: true to my config.

If I dig into the instance_ufos folder, then into a JSON UFO, it starts with this:

{"features":"include(fea/Familyname.fea);"

...where I would expect to see the full features, expanded, rather than the original include() statement.

The build crashes with the error, when attempting to build static OTFs and TTFs:

fontmake: Error: Compiling UFO failed: <features>:1:8: The following feature file should be included but cannot be found: fea/Familyname.fea

However, if I do run fontmake directly on the same designspace, with the arg --expand-features-to-instances, it works just fine.

Am I missing something, or could this be a regression?

@arrowtype
Copy link
Contributor Author

For a little more detail (which seems to point to the more specific issue), here’s a snippet of the build log:

[227/1410] instantiateUfo
fontmake -i Familyname  Extra Wide Extra Light Italic -o ufo -m sources/ufo/FamilynameItalic.designspace --ufo-structure=json --output-dir sources/ufo/instance_ufos
[228/1410] buildTTF
FAILED: /tmp/tmp8sbi6k_4 
/gftools/bin/python -m gftools.builder.jobrunner fontmake --output-path /tmp/tmp8sbi6k_4 -o ttf -u sources/ufo/instance_ufos/FamilynameExtraCompressed-Hairline.ufo.json --filter ...  --filter FlattenComponentsFilter --filter DecomposeTransformedComponentsFilter --expand-features-to-instances 

The way I’m understanding that, it looks like --expand-features-to-instances is being added too late. It needs to be added to the instantiateUfo process, but instead, it’s added only at the buildTTF / buildOTF stage. I’ll go see whether I can test putting it in the earlier stage...

@arrowtype
Copy link
Contributor Author

Oh, I already figured this out and made a PR for it in the past.

#985

Would it be possible to merge that? Is there anything blocking it? It would be pretty helpful for my workflow!

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

No branches or pull requests

1 participant