8000 Detect script and pass to ttfautohint by simoncozens · Pull Request #471 · googlefonts/gftools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Detect script and pass to ttfautohint #471

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

Merged
merged 4 commits into from
Feb 4, 2022

Conversation

simoncozens
Copy link
Contributor

The Noto build scripts pass a -D<script> argument to ttfautohint to enable script-specific hinting adjustments. This is a nice idea, and we should do it if possible. Also, the way Noto implements it is horrible and arbitrary and I'd like to move Noto's build scripts to cleaner code based on gftools where possible.

This checks whether a font file has a clear "winning" script (defined as having more than twice as many code points as any other script in the font) and, if ttfautohint has a script-specific handler for that script, passes the appropriate -D flag.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Jan 31, 2022

This is really nice.

My only concern is we'll now be adding a script tag when we never used to. This could cause regressions but I don't know how bad they'll be. I'll see If I can do some render tests this week.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Jan 31, 2022

Just a thought, why not include a bool option in the config file for this? could be something like ttfaUseScript? it could be set to false by default.

@simoncozens
Copy link
Contributor Author

Yeah, that'll work for me. Will do.

@m4rc1e
Copy link
Collaborator
m4rc1e commented Feb 4, 2022

Thanks Simon. I've just added ttfaUseScript to the config file schema.

@m4rc1e m4rc1e merged commit 5833626 into googlefonts:main Feb 4, 2022
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
0