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

Use other tables generated by fea-rs #406

Open
cmyr opened this issue Aug 17, 2023 · 8 comments
Open

Use other tables generated by fea-rs #406

cmyr opened this issue Aug 17, 2023 · 8 comments

Comments

@cmyr
Copy link
Member

cmyr commented Aug 17, 2023

feature files can end up creating or modifying a bunch of different tables; see https://github.com/cmyr/fea-rs/blob/main/fea-rs/src/compile/output.rs#L22 for the list. It is likely that many of these are rarely used, but at the very least we should be checking if they're present.

@rsheeter
Copy link
Contributor

I'm inclined to say we should start by erroring if fea gave us back any table we don't deal with

@rsheeter
Copy link
Contributor

We'll want to check which things fontmake accepts to be defined by fea and how it handles multiple definitions

@anthrotype
Copy link
Member

Fontmake accepts anything that fonttools feaLib returns with no questions, those are not multiple definitions but rather "overrides"

@anthrotype
Copy link
Member

That's how Adobe FEA spec describes these, and also how makeotf interprets them

@rsheeter
Copy link
Contributor

Is there any case where you have to merge the results or can you always take teh whole table from fea? - for example, I think Colin said you can set modified time in fea and that made me think you'd need to take just that field and copy it into the table you built from non-fea sources. If we can just always take the whole table that would be nice.

@anthrotype
Copy link
Member

You'd take the whole thing, the feature compiler is responsible for applying the overrides

@rsheeter
Copy link
Contributor

rsheeter commented Aug 21, 2023

If the fea compiler is to apply overrides it would have to have access to the thing it is to apply them to? And that makes for all sorts of execution order limitations, e.g. if fea can override modified in head then we must run fea after we make head and we have to somehow make our head available to fea-rs`?

@cmyr
Copy link
Member Author

cmyr commented Sep 7, 2023

I think that having the fea compiler be responsible for merging is a bit of a layering violation; you should be able to compile FEA without knowing much about the final font. I would propose a design where fontc inspects the tables returned by fea-rs and merges them as required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants