opentype.js
opentype.js copied to clipboard
GPOS lookupType 9 support
Description
Add support for GPOS lookupType 9 to be able to manage other extended lookupType. 🤩
Motivation and Context
I noticed, by using this font WorkSans, I was not able to get kerning values. Diving into this problem, I found it was because GPOS lookupType 9 was not supported and only lookupType 2 was used in getKerningTables.
How Has This Been Tested?
- Added an unit test included lookupType 9 data
- Tested on WorkSans font. Now we can get kerning values on this one 💪
- Tested on ProximaNova font to ensure that already lookupType 2 still working as expected
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] I did
npm run testand all tests passed green (including code styling checks). - [x] I have added tests to cover my changes.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the README accordingly.
- [x] I have read the CONTRIBUTING document.
Pinging @AlexandreRivet
This will be covered by https://github.com/opentypejs/opentype.js/pull/557
This will be covered by #557
I was about to close this but tested it before just in case, and with this PR getKerningTables() does return a table for the WorkSans font, but with #557 it doesn't. I'm all for fixing this in one PR instead of two, but we have to keep this one open until the other one implements this correctly.