Open Typogram opened 2 years ago
@davelab6 could you provide some insight on this as well? The happens with Google Fonts' version of EB Garamond, but not with the type designer's version of EB Garamond on their bitbucket repo.
@fdb @fpirsch could you help take a look into this issue?
Could this be related to #546 @ILOVEPIE, or is it something different?
@Connum to help narrow down the problem area, maybe this information helps: I tested fontkit to read the same problem font (EB Garamond from Google Fonts), the kerning data can be read correctly. Here is fontkit's code for getting kerning data in below link. I think opentype.js must have missed one of the scenarios that were covered by fontkit: https://github.com/foliojs/fontkit/blob/master/src/layout/KernProcessor.js#L16
This has already been fixed in the upcoming version.
Nevermind, apparently google has changed their fonts they're hosting.
I suspect #557 will fix this issue.
The issue is the font is missing the old KERN table and has GPOS 9 and 4 entries. This will be fixed by #557.
Download the ttf from https://fonts.google.com/specimen/EB+Garamond. use it as a test. The fonts have kerning info, and can be used as regular desktop fonts with proper kerning. However, OpenType.js can't read its kerning data. letter AV kerning should be -140, but OpenType.js returns 0
Steps to Reproduce (for bugs)
When I open the EB Garamond font with Robofont, I can see there is kerning info in the kern center. AV kern should be -140
Extra info: I download EB Garamond 8pt (another version) from the type designer's Bitbucket repo, and OpenType.js output proper kerning for that font. Included in the codepen example. cc. @davelab6
It may affect other Google Fonts as well, eg.
Your Environment