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

disable COLR layer reuse for interpolatable masters when building variable fonts #627

Merged
merged 3 commits into from Jul 6, 2022

Conversation

anthrotype
Copy link
Member

@anthrotype anthrotype commented Jun 23, 2022

To successfully merge multiple master COLR tables into a variable COLR with varLib (fonttools/fonttools#2660) the master must have the same structure, number of color glyphs, total number of paints, etc. So we want to disable layer reuse optimization performed by fontTools.colorLib.buildCOLR when building each interpolatable COLR masters (otherwise we might end up with different PaintColrLayers or LayerList count between masters).

I also added a colrLayerReuse parameter to compile* methods to force disabling this altogether, in case it might be useful for debugging or speeding up builds.
This is set to True by default for all compile* methods, except for compileInterpolatable*

Requires fonttools/fonttools#2660

@anthrotype anthrotype marked this pull request as draft June 23, 2022 17:34
@anthrotype
Copy link
Member Author

the master must have the same structure, number of color glyphs, total number of paints, etc... otherwise we might end up with different PaintColrLayers or LayerList count between masters

well, not any more, my merging algorithm got cleverer, see fonttools/fonttools@e502980

However, disabling layer reuse when building master COLRs still makes sense from efficiency POW so it's still good to have the option to turn it off

…iable fonts

To successfully merge multiple master COLR tables into a variable COLR with varLib (fonttools/fonttools#2660) the master must have the same structure, number of color glyphs, total number of paints, etc. So we want to disable layer reuse optimization performed by fontTools.colorLib.buildCOLR when building each interpolatable COLR masters (otherwise we might end up with different PaintColrLayers or LayerList count between masters).

I also added a colrLayerReuse parameter to compile* methods to force disabling this altogether, in case it might be useful for debugging or speeding up builds.
This is set to True by default for all compile* methods, except for compileInterpolatable*

Requires fonttools/fonttools#2660
@anthrotype anthrotype marked this pull request as ready for review July 6, 2022 11:07
@anthrotype anthrotype merged commit e701144 into main Jul 6, 2022
@anthrotype anthrotype deleted the variable-colr branch July 6, 2022 11:14
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

1 participant