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

Sanity check: STAT names must match Designspace instance style names #18

Open
madig opened this issue Jan 9, 2020 · 11 comments
Open

Sanity check: STAT names must match Designspace instance style names #18

madig opened this issue Jan 9, 2020 · 11 comments

Comments

@madig
Copy link
Collaborator

madig commented Jan 9, 2020

A single-axis VF must have entries that match instance style names. A multi-axis VF must have entries that when concatenated in the specified order must match instance style names.

@twardoch
Copy link

twardoch commented Jan 9, 2020

That should not be extensive ie. if I have a 6-axis font, I may want to define 6 named axis instances on each axis in STAT, but I may prefer not to define 46,656 (or whatever) fvar instances ;)

@twardoch
Copy link

twardoch commented Jan 9, 2020

In other words there may be STAT combinations that don't correspond to fvar instances

@twardoch
Copy link

twardoch commented Jan 9, 2020

I’d leave out the multiaxis check. There may be cases where I create fvar instance names concatenating style records in a particular order for legacy reasons but I may prefer to order the fvar axes differently

@twardoch
Copy link

twardoch commented Jan 9, 2020

But the single-axis check is reasonable

@twardoch
Copy link

twardoch commented Jan 9, 2020

Does your code reuse name table entries? Single-axis would bebefit from such a treatment that you check if the STAT name records match existing instance names, if they do, you reuse the name entry, if they don't, you warn

@twardoch
Copy link

twardoch commented Jan 9, 2020

Though a reverse check, i.e. if all fvar instance names can be expressed as a space concatenation of STAT axis instances in the axis order — that'd be useful

@twardoch
Copy link

twardoch commented Jan 9, 2020

with the special case "Regular", I guess

@madig
Copy link
Collaborator Author

madig commented Jan 10, 2020

Does your code reuse name table entries

Not yet: #17.

Though a reverse check, i.e. if all fvar instance names can be expressed as a space concatenation of STAT axis instances in the axis order — that'd be useful

That's what I was thinking. Though that then messes with "concatenating style records in a particular order for legacy reasons"? Hrm.

@twardoch
Copy link

Well, that's a special "I know what I'm doing" case, so a warning is still fine

@kontur
Copy link

kontur commented Sep 2, 2020

Shouldn't statmake support writing STAT entries that are not defined as variable instances? E.g. the latest GF suggestion is to have only a subset of instances, but a full STAT table.

@madig
Copy link
Collaborator Author

madig commented Sep 2, 2020

Maybe. It currently explicitly prunes STAT entries that aren't present in the fvar. At least IIRC, haven't looked at the code in a while.

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

3 participants