How can I include features from an external .fea file?

Hi, I want to use an external features file. How can I do it?
I tried: include (features/myFeatures.fea); but it doesn’t work. Any way of doing this?

1 Like

You would need to put the .fea file into (or relative to) the Temp folder. But: why?

Ok. I want to share the same external feature file for a bunch of files.
If there’s any table I don’t want to be written by Glyphs on font generation, should I tell it in some special way?
BTW, how the “Temp” folder gets cleaned up? I just realized I’ve 105 items in there.

What tables do you mean?

Just wondering, let’s say OS/2 or name p.e.

But why do you need a font without an OS/2 or name table? You need both. If you have a special circumstance, you can easily remove them with fontTools/TTX.

I don’t need it, as I said I’m just wondering. And I don’t want it out.
Say I have 300 fonts and I want have a common ‘name’ table for all of them and not set it in the files, can I put this table in a features file in the “Temp” folder and get it in the compiled fonts? I also know I can do it with TTX/fontTools. Thanks!

Having a totally custom name table is not possible at the moments. That is to intervened in the export code that it would be to complicated to support and it is very seldom needed.

Ok, perfect, I understand and makes sense. Many thanks.

But I just implemented better support for the include(); statement. Will be out in the next update.


that’s wonderful, nice!

I get this message when trying to use ‘include(pathToFeaturesFile.fea);’
There is an ‘include();’ statment with a relative path in the feature code (in XXXX) but the document is not saved yet.
Please save the file
Pressing button ‘Details’ send me to ‘temp’ folder
(using latest build)

Am I doing something wrong? (using latest build)

The error message means that the .glyphs file is not saved, yet. So it doesn’t know where to find the feature.fea file.

But it is saved… with the new ‘include’ statement (and it’s an old file). I hit cmd-S, compile features and get this error message.

What is the path to the .glyphs file and what exactly do you have in the include() statement?


FontnameSharedFeatures.fea has the ‘locl’ feature and auto-‘locl’ is disabled.

Any new on this? I just installed the latest cutting edge version and the same happens.
I think paths and code are correct, aren’t they? Thanks!

I found the problem and fixed it.

Great, thanks.

What is the current state of this?
I tried include the .fea file using include(features.fea); inside the salt feature but It doesn’t work. The .fea file is in the same folder of the .glyphs file.
Any help? Thanks in advance.