-
Notifications
You must be signed in to change notification settings - Fork 487
[fealib] Support *Base.MinMax tables #3783
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
Conversation
nice, thank you. So to confirm, this currently supports BaseCoord format 1 (no contour point nor device), only minmax for scripts/languages but not for specific features; and only static minmax values, no variations (I don't think we support variable BASE at all). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
i wonder (not that we should block on this), does makeotf support compiling BASE MinMax statements? |
Correct, yes.
No, it doesn't. |
@@ -1306,6 +1306,20 @@ def parse_table_BASE_(self, table): | |||
location=self.cur_token_location_, | |||
) | |||
) | |||
elif self.is_cur_keyword_("HorizAxis.MinMax"): | |||
if len(statements) < 1 or not isinstance( | |||
statements[-1], self.ast.BaseAxis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was testing this and had comments in my feature file, like this:
HorizAxis.BaseTagList romn;
HorizAxis.BaseScriptList latn romn 0;
HorizAxis.MinMax latn dflt -800, 1200;
# Some comment
HorizAxis.MinMax latn VIT -800, 2000;
and I got the error "MinMax must be preceded by BaseScriptList". I guess it's because of the -1 lookup, probably it finds the comment instead of the BaseScriptList? Do we want to support comments in this place? If so I can do a PR. For now I just moved my comment out of the way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should support them, yes. We should skip backwards to find the last BaseAxis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make a small PR with a test and bugfix
Nobody told me this was missing!