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 fontsetter #821

Merged
merged 2 commits into from
Feb 5, 2024
Merged

add fontsetter #821

merged 2 commits into from
Feb 5, 2024

Conversation

m4rc1e
Copy link
Collaborator

@m4rc1e m4rc1e commented Feb 1, 2024

This module adds the ability to change font attributes from a yaml file e.g

fix.yaml:

OS/2->sTypoAscender: 1000
name->setName: ["Inter 4, 1, 3, 1, 0x409]

cli:

python -m gftools.fontsetter MavenPro[wght].ttf fix.yaml

It can also call functions on font tables. In the above example, we execute name.setName with the values being a list of arguments. The design is pretty generic so I wouldn't be surprised if it could work on .ufos as well with minimal tweaking.

My plan is to eventually add this to the gftools builder and gftools fix-font. Many people would argue that they'd prefer these modifications to be made to font sources only. However, many families have such as Inter don't follow our spec 1/1 so this module gives us the ability to cut our own release which conforms to our requirements.

@m4rc1e m4rc1e merged commit 150d7f1 into main Feb 5, 2024
11 checks passed
@simoncozens simoncozens deleted the font-setter branch May 30, 2024 07:46
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