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

feature files missing in newest fontmake #1096

Open
cjdunn opened this issue May 28, 2024 · 7 comments
Open

feature files missing in newest fontmake #1096

cjdunn opened this issue May 28, 2024 · 7 comments

Comments

@cjdunn
Copy link

cjdunn commented May 28, 2024

Just hit this error when building with the latest fontmake 3.9.0
Compiling UFO failed: <features>:1:8: The following feature file should be included but cannot be found: ../fea/MyFeatures.fea

I'm not sure where this got broken, but in previous versions this was not an issue. FWIW, my .ufo files are in a folder called 1-drawing and my feature file: MyFeatures.fea is in a parallel folder called fea, and in each .ufo file I have include(../fea/MyFeatures.fea); Not sure if it matters, but my designspace file myTypeface.designspace is in another parallel folder called designspace. All of these folder (1-drawing, fea, and designspace) are in the same enclosing folder. So I can't figure out where fontmake is expecting the features to be located now.

If I generate from RoboFont, my features are included without issue. Same when I preview my features using the FeaturePreview extension. I would expect fontmake to match this behavior.

This used to work in fontmake 2x, I'm not sure where this changed. This is a bug, right?

@anthrotype
Copy link
Member

anthrotype commented May 28, 2024

I don't think we changed anything about that recently.
I'm not sure I understood exactly your project source layout.. Maybe can you use the tree command to show what the directories and files look like?
Or ls -R to recursively list all files and directories

@cjdunn
Copy link
Author

cjdunn commented May 28, 2024

The structure looks like this:

sources/
├── 1-drawing
│   ├── source1.ufo
│   │   ├── features.fea
├── fea
│   ├── MyFeatures.fea 
├── designspace
│   ├── myTypeface.designspace
└── other folder

inside source1.ufo in the features.fea file I have include(../fea/MyFeatures.fea);
Currently in Robofont this works. And in previous versions of fontmake this worked. Now it doesn't not so I'm confused.

If I go back to my old venv (fontmake version 2.0) from when I last built from these sources I can generate fonts without issue. So that's what I'll do for now.

@khaledhosny
Copy link
Collaborator

khaledhosny commented May 28, 2024

The UFO spec specifies that includes should be relative to the UFO path not the features.fea file. You need to drop the leading ../ from the include path.

@anthrotype
Copy link
Member

You need to drop the leading ../ from the include path.

no, the include path is correct. Notice that the source1.ufo is in turn inside a subfolder 1-drawing, which is a sibling of the fea directory where MyFeatures.fea is.
I'll try to reproduce this locally if I can and get back to you

@anthrotype
Copy link
Member

anthrotype commented May 28, 2024

I can not reproduce the issue using fontmake 3.9.0 and the following test file (see attached zip):

$ tree ufo_fea_include_test/
ufo_fea_include_test/
├── 1-drawing
│   └── source1.ufo
│       ├── features.fea
│       ├── fontinfo.plist
│       ├── glyphs
│       │   ├── A_.glif
│       │   ├── contents.plist
│       │   └── layerinfo.plist
│       ├── layercontents.plist
│       ├── lib.plist
│       └── metainfo.plist
├── designspace
│   └── MyTypeface.designspace
└── fea
    └── MyFeatures.fea

6 directories, 10 files

ufo_fea_include_test.zip

When I run fontmake ufo_fea_include_test/designspace/MyTypeface.designspace -o variable, it completes without error and builds the variable_ttf/MyTypeface-VF.ttf.

@cjdunn
Copy link
Author

cjdunn commented May 29, 2024

Thank you for sending over the test file. Hmm, your test file worked for me too in both the old and new versions of fontmake. Now I have no idea what causing the problem with my files in the newer fontmake.

When I have time I might try to make a bunch of VENVs with different versions of fontmake to see where the problem starts happening for my files.

@anthrotype
Copy link
Member

anthrotype commented May 29, 2024

It’d be great if you could reduce it to a minimal reproducer that could be shared in here.
Try to compare my files with yours and see if you might have missed some important difference

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

3 participants