googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

Apply DesignSpace variable-font's public.fontInfo lib key to variable fonts #816

Closed khaledhosny closed 9 months ago

khaledhosny commented 9 months ago

Fixes #812

khaledhosny commented 9 months ago

@anthrotype This is a PoC of using PostProcessor to update the compiled font. The use of OutlineCompiler is essentially a hack to avoid duplicating much logic about building tables, but I don’t like it much. Probably some duplication is OK, or may be we should go back to your initial idea, but I don’t know how to make it work for multiple variable-fonts with the current building and merging logic.

anthrotype commented 9 months ago

I don't like this conceptually. We should try to see if we can maybe duplicate/make the base master unique before proceeding to compile each VFs

anthrotype commented 9 months ago

We should try to see if we can maybe duplicate/make the base master unique before proceeding to compile each VFs

argh.. I actually tried and failed, it's too complicated 😢

anthrotype commented 9 months ago

I'm warming up to the idea that this is best done inside the postProcessor like you're doing here. I don't like it but I dislike the alternative more

khaledhosny commented 9 months ago

We should try to see if we can maybe duplicate/make the base master unique before proceeding to compile each VFs

argh.. I actually tried and failed, it's too complicated 😢

I was trying that as well and it is indeed complicated.

anthrotype commented 9 months ago

looking better now, thanks. Can we add some tests?

khaledhosny commented 9 months ago

Can we add some tests?

Done.