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

ItemVariationStore should allow just-in-time evaluation #5

Open
Lorp opened this issue Dec 21, 2023 · 0 comments
Open

ItemVariationStore should allow just-in-time evaluation #5

Lorp opened this issue Dec 21, 2023 · 0 comments

Comments

@Lorp
Copy link
Owner

Lorp commented Dec 21, 2023

Current behaviour is to evaluate all ItemVariationStores in the font when a SamsaInstance is created. This is almost certainly a bad idea, since only a tiny number of the values will get used in the session, and some fonts may struggle to generate instances quickly.

Therefore it makes sense to evaluate all the IVS scalars upon instantiation (since that’s cheap), and create an array of empty arrays to hold the interpolated delta values at column:row, or outer:inner. Thus initially an IVS would populate a scalars array for each IVD. Then when an outer:inner pair was requested, the relevant deltaSet is add-multiplied by the relevant scalar set, yielding a value that is stored and returned. Whether it’s worth storing the result should be tested.

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

1 participant