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 support for GPOS kerning information parsing #20

Merged
merged 2 commits into from
Apr 11, 2014
Merged

Add support for GPOS kerning information parsing #20

merged 2 commits into from
Apr 11, 2014

Conversation

fpirsch
Copy link
Collaborator

@fpirsch fpirsch commented Mar 28, 2014

This PR provides basic GPOS table parsing.
It reads Pair Adjustment Positioning Subtables (format 1 and 2).
It does not use script and feature information, nor vertical adjustment information.

@davelab6
Copy link

Sweet

@fdb
Copy link
Contributor

fdb commented Mar 30, 2014

Wow awesome! I'll look at this ASAP. Thanks!

fdb added a commit that referenced this pull request Apr 11, 2014
Add support for GPOS kerning information parsing.
@fdb fdb merged commit fc8ac15 into opentypejs:master Apr 11, 2014
@fdb
Copy link
Contributor

fdb commented Apr 11, 2014

I've just tried this out on my font stash and it seems to work! Some of the Windows fonts (Candara, Corbel) have no KERN table but do have GPOS information, and this pull request picks them up nicely.

@fpirsch
Copy link
Collaborator Author

fpirsch commented Apr 11, 2014

Thanks.
Known limitations :
• Current GPOS support doesn't use coverage tables. Which is bad because some fonts (e.g. Null-free) have kerning info for glyphs that are NOT covered. A good implementation should use kerning info only for covered glyphs. I have a fix for this.
• Full GPOS support should use the scripts and features subtables. Currently if multiple kerning subtables are found, well, you just have to hope that the good one is picked up.
• I don't know enough yet about how many kerning pairs we are dealing with in a "standard" font, or how covered glyphs are distributed, so there is absolutely no optimisation. This could be an issue.

@fpirsch fpirsch deleted the gpos-kerning branch April 11, 2014 22:09
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.

3 participants