Open marekjez86 opened 3 years ago
@madig : I assigned this to you because all of these sources came from DaMa (I'm not sure sure if you are still there, but I hope you can help me to resolve the problem or to find somebody else who could do it). Note that my objective is to compile these sources consistently so I don't care if this is a source fix or a tool fix.
I think there may be a simple fix: in the UFO's features.fea files, change instances of include(family.fea)
to include(../family.fea)
. There's a bit of confusion around include paths and them being relative to the UFO itself or the actual file on the file system. I forgot which way it should be... @anthrotype
But that's what the UFOs are doing:
So... is fontmake confused?
indeed the master source files are correct, it should be include(family.fea)
not include(../family.fea)
.
I think Marek actually hit https://github.com/googlefonts/fontmake/issues/359
@marekjez86 can you retry by passing the --expand-features-to-instances
command line option, and see if that works?
We should make that the default...
I hit this for the umpteenth time, and I’m glad to learn there's an option to expand the path to the generated instance UFOs!
I definitely agree that this seems like a sensible default. Is there a case when someone would not want to expand that path?
The only reason we did not make it the default is someone from Adobe saying it might impact their workflow or something.
Since handling of includes was changed in fontmake (or one of the libraries it uses) I'm unable to build instances for the following fonts:
All the sources I use for this build are in https://github.com/googlefonts/noto-source/tree/main/src
The symptoms of the failure (for example for fontmake -m src/NotoSerifYezidi/*.designspace -i -o otf ttf ):
INFO:fontmake.font_project:Interpolating master UFOs from designspace INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Yezidi Regular" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Yezidi Medium" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Yezidi SemiBold" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Yezidi Bold" INFO:fontmake.font_project:Building OTF for NotoSerifYezidi-Regular INFO:ufo2ft:Pre-processing glyphs INFO:ufo2ft.filters.base:Running DecomposeComponentsFilter on NotoSerifYezidi-Regular INFO:ufo2ft.filters.base:Running RemoveOverlapsFilter on NotoSerifYezidi-Regular INFO:ufo2ft:Building OpenType tables fontmake: Error: In 'src/NotoSerifYezidi/NotoSerifYezidi.designspace' -> 'src/build/instance_ufos/NotoSerifYezidi-Regular.ufo': Compiling UFO failed: src/build/instance_ufos/NotoSerifYezidi-Regular.ufo/features.fea:1:8: The following feature file should be included but cannot be found: family.fea
I need help fixing the sources or fixing something in the fontmake (or libraries).
Note that I can build the variable fonts but I'm not certain anymore that it properly deals with the external feature file.
I believe that the issue is that "fontmake et al" creates build instance_ufos in a separate build directory. However, the features.fea in each UFO includes file that is in the .. directory in the sources which is not copied to the build UFO structure.
PS. For NotoSerifNyiakengPuachueHmong the file path is somewhat different but the failure is the same INFO:fontmake.font_project:Interpolating master UFOs from designspace INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Hmong Nyiakeng Regular" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Hmong Nyiakeng Medium" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Hmong Nyiakeng SemiBold" INFO:fontmake.font_project:Generating instance UFO for "Noto Serif Hmong Nyiakeng Bold" INFO:fontmake.font_project:Building OTF for NotoSerifHmongNyiakeng-Regular INFO:ufo2ft:Pre-processing glyphs INFO:ufo2ft.filters.base:Running DecomposeComponentsFilter on NotoSerifHmongNyiakeng-Regular INFO:ufo2ft.filters.base:Running RemoveOverlapsFilter on NotoSerifHmongNyiakeng-Regular INFO:ufo2ft:Building OpenType tables fontmake: Error: In 'src/NotoSerifNyiakengPuachueHmong/NotoSerifNyiakengPuachueHmong.designspace' -> 'src/NotoSerifNyiakengPuachueHmong/instance_ufos/NotoSerifNyiakengPuachueHmong-Regular.ufo': Compiling UFO failed: src/NotoSerifNyiakengPuachueHmong/instance_ufos/NotoSerifNyiakengPuachueHmong-Regular.ufo/features.fea:1:8: The following feature file should be included but cannot be found: family.fea
PS2. I believe I can copy the common feature file into each instance UFO and this would fix the issue but the designer of the font established a common feature file for all instances and copying this file into each instance would fore us to maintain multiple copies of the same info