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

Support building gasp table #990

Open
anthrotype opened this issue Oct 3, 2024 · 0 comments
Open

Support building gasp table #990

anthrotype opened this issue Oct 3, 2024 · 0 comments

Comments

@anthrotype
Copy link
Member

anthrotype commented Oct 3, 2024

Both Glyphs and DS+UFO sources allow to define the gasp table settings.

https://unifiedfontobject.org/versions/ufo3/fontinfo.plist/#opentype-gasp-table-fields

https://glyphsapp.com/learn/hinting-manual-truetype-hinting (search "gasp table" in the page)

This is an example of a .designspace project defining openTypeGaspRangeRecords in the fontinfo.plist:
https://github.com/wix-incubator/wixmadefor/

This one is a .glyphs project containing the equivalent gasp Table custom parameter:
https://github.com/justvanrossum/nabla

fontmake uses glyphsLib to convert the Glyphs custom parameter to the UFO property here:
https://github.com/googlefonts/glyphsLib/blob/main/Lib/glyphsLib/builder/custom_params.py#L527-L540

then ufo2ft reads the fontinfo's openTypeGaspRangeRecords to generate a gasp table here:
https://github.com/googlefonts/ufo2ft/blob/5fd168e65a0b0aa25298ad970546c3ab99d910c6/Lib/ufo2ft/instructionCompiler.py#L331-L342

It looks like write_fonts doesn't support writing gasp table yet, so that needs to be done first before fontc can even build one.

Right now, for font sources defining gasp settings ttx_diff.py reports:

COMPARISON
  Only fontmake produced 'gasp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant