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

Glyphs.app's Feature Condition Syntax is not supported #951

Open
kostictype opened this issue Oct 31, 2022 · 5 comments
Open

Glyphs.app's Feature Condition Syntax is not supported #951

kostictype opened this issue Oct 31, 2022 · 5 comments

Comments

@kostictype
Copy link

I'm using fontmake to export VF with CFF2 outlines from a Glyphs3 file. It builds the UFO and designspace but then fails when I have this code in the feature rlig:

feature rlig {
#ifdef VARIABLE
condition 18 < wght < 278, wdth < 40;
sub dollar by dollar.gap;
sub dollar.ss06 by dollar.ss06.gap;
sub cent by cent.gap;

condition 100 < wght < 278, wdth < 100;
sub dollar by dollar.gap;

condition 152 < wght < 278, wdth < 70;
sub dollar.ss06 by dollar.ss06.gap;
sub cent by cent.gap;

condition 18 < wght < 152, wdth < 40;
sub ampersand by ampersand.comp;

#endif

} rlig;

This is the error: Generating fonts from Designspace failed: <features>:510:1: Expected glyph class definition or statement: got NAME condition
(line 510 is: condition 18 < wght < 278, wdth < 40;)

Is there way to go around this changing the Glyphs file? Or some other simple solution?

@anthrotype
Copy link
Member

I think that's Glyphs.app's specific way to specify FeatureVariations-style conditional substitutions, the official FEA spec is set to encode these differently -- if/when @simoncozens proposal at adobe-type-tools/afdko#1350 is merged (not sure what's the status on that). fonttools, which fontmake uses to compile OT layout features, only supports the latter.

glyphsLib may eventually add support for translating from Glyphs.app's own notation to the FEA variation syntax, but I don't think anybody is actively working on that, see googlefonts/glyphsLib#800

@anthrotype anthrotype changed the title Feature Condition Syntax Glyphs.app's Feature Condition Syntax Nov 1, 2022
@anthrotype anthrotype changed the title Glyphs.app's Feature Condition Syntax Glyphs.app's Feature Condition Syntax is not supported Nov 1, 2022
@kostictype
Copy link
Author

Thank you for the information!

@vv-monsalve
Copy link

I'm having the same situation with another project. I left a comment in the glyphsLib#800 issue linked above.

@HugoJourdan
Copy link

Same problem here.
Impossible to generate variable with rlig feature syntax from of Glyphs.

@arrowtype
Copy link

Running into this, as well. Also posted over on the glyphsLib issue.

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

No branches or pull requests

5 participants