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


#1

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?
Thanks!


#2

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


#3

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.
Thanks!


#4

What tables do you mean?


#5

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


#6

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.


#7

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!


#8

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.


#9

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


#10

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


#11

that’s wonderful, nice!


#12

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)


#13

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


#14

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.


#16

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


#17

~/Dropbox/Development/Fontname/sources/_170626/Fontname-Regular_170626.glyphs
~/Dropbox/Development/Fontname/sources/_170626/FontnameSharedFeatures.fea
include(FontnameSharedFeatures.fea);

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


#18

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!


#19

I found the problem and fixed it.


#20

Great, thanks.


#21

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.