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

Add '--expand-features-to-instances' arg to fontmake UFO generation #985

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arrowtype
Copy link
Contributor

UFOs can use relative include statements to import feature files, which is very helpful in the case of a family that has many UFO sources, but just one feature file required. Or, it’s helpful if there are many features, and several complex ones, so they are split into multiple files (example: a Recursive UFO source and its features directory).

Currently, the Builder just brings the include statement directly into the instance UFOs, but then the relative paths are broken, so the fonts don’t build.

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

However, it is very easy to support by adding the arg --expand-features-to-instances to the UFO instantiation step, as I have done in this PR.

I’ve tested this on a UFO-based family (with includes) and a Glyphs-based family (with normal Glyphs-based features), and it seems to work well in both cases. The features are built into the fonts, as expected.

I’m not aware of any downsides or hidden issues with adding this, but they might exist. If any are known, I would be very interested in learning about such cases.

Please let me know if you have any questions or suggestions here! Thanks so much.

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

Successfully merging this pull request may close these issues.

1 participant