Skip to content

Conversation

simoncozens
Copy link
Collaborator

Nobody told me this was missing!

@anthrotype
Copy link
Member

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

Copy link
Member

@anthrotype anthrotype left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anthrotype
Copy link
Member

i wonder (not that we should block on this), does makeotf support compiling BASE MinMax statements?

@simoncozens
Copy link
Collaborator Author

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

Correct, yes.

does makeotf support compiling BASE MinMax statements?

No, it doesn't.

@simoncozens simoncozens merged commit 051eefe into main Feb 27, 2025
11 checks passed
@simoncozens simoncozens deleted the base-minmax branch February 27, 2025 12:04
@@ -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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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

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 this pull request may close these issues.

3 participants