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 Postscript blue zones for letters and numbers #188

Merged
merged 1 commit into from
May 1, 2020

Conversation

madig
Copy link
Contributor

@madig madig commented Nov 20, 2019

Summary of the Pull Request

Add Postscript blue zones that enclose letters and common numbers and define vertical and horizontal stem widths. This helps with autohinting OTFs.

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Requires FONTLOG.txt to be updated
  • Requires /images/cascadia-code.png and/or /images/cascadia-code-characters.png to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

When not producing TTFs but OTFs, hinting is a matter of running https://github.com/adobe-type-tools/psautohint/ on the resulting binary. For the autohinter to do its job, it needs to know the standard widths of a font plus so-called blue zones, which tell the tool which heights points of a glyph should be snapped to. They also help with consistency in the design phase, because e.g. Glyphs will indicate when a point is within or outside a blue zone.

TTFs are unaffected by this change since the format does not use them.

Before (if applicable) and After Images of the Character(s)

Bildschirmfoto von 2019-11-20 20-49-41
Bildschirmfoto von 2019-11-20 20-49-45
Bildschirmfoto von 2019-11-20 20-49-50
Bildschirmfoto von 2019-11-20 20-54-16

Validation Steps Performed

Manually looking at the resulting font in a terminal and in VSCode.

@mdtauk
Copy link

mdtauk commented Nov 20, 2019

PS Hinting for OTF is separate to TTF hinting.

@madig
Copy link
Contributor Author

madig commented Nov 20, 2019

Yes. This is for my private OTFing/in anticipation for making official OTFs one day. I love the way FreeType renders them.

@DHowett-MSFT
Copy link

Hey @aaronbell -- since we're not producing our own OTFs, should we merge this to make it so that other people can? I feel bad having let this languish for so long.

@aaronbell
Copy link
Collaborator

@DHowett-MSFT Sure. I haven't had a chance to review the additions, but I figure @madig got it right :).

It might be worth considering building our own OTF files, though. ufo2ft also has a makeOTF function, so it shouldn't be too hard to add it into the build script.

@madig
Copy link
Contributor Author

madig commented May 1, 2020

I've been using these in my home-made OTF and everything looks great. So, unless someone changed fundamental design heights, they should be good.

@DHowett-MSFT
Copy link

@madig thank you; I'm sorry it took so long to merge this. 😄

@DHowett-MSFT DHowett-MSFT merged commit a8bbd67 into microsoft:master May 1, 2020
@madig madig deleted the add-bluezones branch May 1, 2020 21:21
@madig
Copy link
Contributor Author

madig commented May 1, 2020

No worries, this PR paid dividends in the meantime.

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.

4 participants