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

extractor does not generate features.fea for OpenType features #49

Closed
NightFurySL2001 opened this issue May 29, 2022 · 8 comments · Fixed by #54
Closed

extractor does not generate features.fea for OpenType features #49

NightFurySL2001 opened this issue May 29, 2022 · 8 comments · Fixed by #54

Comments

@NightFurySL2001
Copy link
Contributor

NightFurySL2001 commented May 29, 2022

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.

@benkiel
Copy link
Member

benkiel commented May 31, 2022

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

@NightFurySL2001
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@benkiel
Copy link
Member

benkiel commented Jun 8, 2023

Thank you!

@NightFurySL2001
Copy link
Contributor Author

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

@NightFurySL2001
Copy link
Contributor Author

@benkiel , CC @simoncozens

@typemytype
Copy link
Member

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

@benkiel
Copy link
Member

benkiel commented Jun 26, 2023

@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.

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

Successfully merging a pull request may close this issue.

3 participants