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 gftools-autohint.py #582

Merged
merged 2 commits into from
Sep 4, 2023
Merged

Add gftools-autohint.py #582

merged 2 commits into from
Sep 4, 2023

Conversation

simoncozens
Copy link
Contributor

I realised we needed a command line wrapper around gftools.autohint (i.e. ttfautohint-py with our script-detection logic added) for the ninja builder, because everything the ninja builder calls has to be a command line utility.

But I also realised that it's useful for us to provide a command-line wrapper around ttfautohint-py anyway. The whole point of ttfautohint-py is that it gives you an easy way to install the latest version of ttfautohint, not just the one in your distribution (which can be quite old), and the whole point of gftools is that you can install it and get the latest version of everything you need to build fonts. But installing ttfautohint-py doesn't give you an easy way to run the latest version of ttfautohint.

I also needed something to get the right script for auto hinting full Noto fonts; these contain a Latin set but may be quite small. With our current script detection logic a large Latin set might overwhelm a small other set of glyphs, which are actually the ones you want to target for autohinting. The discount_latin argument ignores Latin glyphs when determining which is the primary script of a font .

@m4rc1e
Copy link
Collaborator

m4rc1e commented Sep 2, 2022

Apologies for not reviewing this. I'll cut a release and look at this next week.

@simoncozens
Copy link
Contributor Author

No problem. I suggest we split the primary script detection out to another module, and also use the GSUB closure trick I posted elsewhere, so we can use this to fill in primary script metadata on new fonts (or backfill the old catalogue).

@simoncozens
Copy link
Contributor Author

I'm merging this because we have already added the primary script detection code, and we have builder.autohint already, so this is now just a CLI wrapper.

@simoncozens simoncozens merged commit daae618 into main Sep 4, 2023
9 checks passed
@simoncozens simoncozens deleted the gf-autohint branch September 4, 2023 14:43
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.

2 participants