extractor icon indicating copy to clipboard operation
extractor copied to clipboard

extractor does not generate features.fea for OpenType features

Open NightFurySL2001 opened this issue 3 years ago • 2 comments

All UFO files generated by extractor does not produce the Adobe OpenType Feature File features.fea according to UFO 3 specification. This will make the font lose all OpenType features when converting into UFO. (UFO export of FontForge did include features.fea.

Since this is using fontTools for binary OpenType font file, the feaLib can be used to accomplish the task. The main OpenType tables involved are GSUB, GPOS and GDEF.

NightFurySL2001 avatar May 29 '22 14:05 NightFurySL2001

Makes sense. feaLib didn't exist when this library was first written. PR?

benkiel avatar May 31 '22 15:05 benkiel

I'm not sure how to add support for this.... 😅 There seem to be a library that does that though: https://github.com/simoncozens/fontFeatures

NightFurySL2001 avatar Jun 01 '22 05:06 NightFurySL2001

Think I got it working now. Actually VFB module does have feature in it which surprise me for a sec there. I used the same parameter name as that.

NightFurySL2001 avatar Jun 08 '23 11:06 NightFurySL2001

Thank you!

benkiel avatar Jun 08 '23 17:06 benkiel

Just wondering, should we pass the do_gdef and doLookups paramms in fontFeatures unparse to the extractor function?

NightFurySL2001 avatar Jun 09 '23 01:06 NightFurySL2001

@benkiel , CC @simoncozens

NightFurySL2001 avatar Jun 25 '23 14:06 NightFurySL2001

Do not add all options fontFeatures offers to unparse, extractor just extracts from various formats to UFO.

typemytype avatar Jun 26 '23 07:06 typemytype

@NightFurySL2001 Agree with @typemytype, for this you don't want the gdef and the default in fontFeatures is to do the lookups, which is what you want.

I'm looking at see if it may be possible to just use fontTools for this instead of importing another package, but for now this is good and needs nothing else.

benkiel avatar Jun 26 '23 14:06 benkiel