-
Notifications
You must be signed in to change notification settings - Fork 43
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
Designspace rules and feature variations are incompatible #838
Comments
I'm don't know feaLib much, but I do know how the DS rules are "merged". I can explain that if you want. Let me know if I can be of any help. |
call to varLib.addGSUBFeatureVariations (which handles DS rules) should happen after the variable features (possibly containing conditionset blocks) have been compiled, because feaLib can only build new OTL tables from scratch, not update existing ones. I think we do that here: ufo2ft/Lib/ufo2ft/_compilers/baseCompiler.py Lines 470 to 471 in 779bbad
can you post an example that reproduces these supposed conflicts? |
I'll try to make a repro soon. I found that feaLib seems to call |
Repro: aaaa.zip The font got a wght and TRAK axis, with two variations:
The way the features are written, the condition sets interfere with each other. The following example uses the text "FRh", so "h" is the pi-like shape:
This shows that existing condition sets are not taken into consideration when adding new feature variations. So, you have to either rely entirely on the var fea for all of it (and do the feature overlap boxing yourself, which would otherwise be done for you in |
I think feaLib should also call |
That won't rewrite existing condition sets to not conflict with the new additions, no? |
No. For that we need more oomph. |
I didn't realize this before, and maybe I'm confused, but it seems that Designspace rules and feature variations are incompatible with each other, at least with the current implementation of varLib. Compiling a VF with DS rules and then calling
addGSUBFeatureVariations
either conflicts (when targeting the same feature as the rules) or overwrites what's there, if I understand correctly. Now that ufo2ft enables variable feature compilation by accident due to compiling identical feature files once and injecting them into the VF binary, it may need a RulesWriter of sort, that translates rules into variable features.I don't understand the constraints around these enough yet, though. Like, how easy or hard is it to mix the generated feature variations for DS rules with custom variations you're writing?
The text was updated successfully, but these errors were encountered: