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

Allow extrapolation in normalization #2847

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

simoncozens
Copy link
Collaborator

We are allowing extrapolation in the variation model, but when we normalise values, these are still clamped to the axis min/max (-1.0<=>1.0). This allows normalized values to extend beyond that range.

This may not be the right approach, because it looks like the extrapolation option of the variation model allows for values which aren't normalised but which just have a min/max range. But I don't understand that well enough to know how it handles defaults.

@justvanrossum
Copy link
Collaborator

This looks good to me. Some tests would be nice.

The fact that VariationModel can work with unnormalized values (extrapolating or not) is tangential I think.

@anthrotype
Copy link
Member

Some tests would be nice.

+1, even if just a couple of doctests

how it handles defaults.

default is always assumed to be at 0 for VariationModel, whether or not min/max are -1/+1 or beyond that

@simoncozens
Copy link
Collaborator Author

default is always assumed to be at 0 for VariationModel, whether or not min/max are -1/+1 or beyond that

Ah, OK, so this is indeed tangential, and will be needed for the glyphsLib thing.

I'll work on tests.

@anthrotype
Copy link
Member

behdad's instancer-L4 PR contain exactly the same change as yours.
ccbbd9b

i'm going to merge this and add a couple tests myself, thanks

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.

None yet

3 participants