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

add ftConfig parameter to set fontTools' TTFont.cfg options #607

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

anthrotype
Copy link
Member

@anthrotype anthrotype commented Apr 25, 2022

This adds a new ftConfig parameter to all compile methods that allows to set fonttools configuration options as defined in (e.g. to turn on/off the serialization of GPOS/GSUB with the harfbuzz repacker):

https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/config/__init__.py

since these config options are set on the TTFont instance itself (in its cfg attribute) but ufo2ft creates a new TTFont instance from scratch, this new parameter will allow a client (e.g. fontmake) to specify these options and have ufo2ft configure the newly created TTFont object with them.

@anthrotype anthrotype marked this pull request as draft April 25, 2022 10:44
@anthrotype anthrotype changed the title add ftConfig parameter to set set fontTools' TTFont.cfg options add ftConfig parameter to set fontTools' TTFont.cfg options Jul 31, 2023
@anthrotype anthrotype marked this pull request as ready for review July 31, 2023 15:36
@anthrotype anthrotype mentioned this pull request Jul 31, 2023
2 tasks
@anthrotype
Copy link
Member Author

at the risk of bikeshedding.. do we all like the name ftConfig for this "fonttools config" parameter to ufo2ft's compile methods? If it isn't clear enough, we can spell it out as "fontToolsConfig" or even "ttFontConfig" to avoid any confusions.

and use it to pass fontTools.otlLib.optimize.gpos:COMPRESSION_LEVEL instead of env var
@anthrotype anthrotype merged commit 702975e into main Jan 11, 2024
9 checks passed
@anthrotype anthrotype deleted the fonttools-config branch January 11, 2024 17:59
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.

1 participant