Skip to content

Conversation

@AlexandreRivet
Copy link

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)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I did npm run test and all tests passed green (including code styling checks).
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the README accordingly.
  • I have read the CONTRIBUTING document.

Copy link
Contributor

@ILOVEPIE ILOVEPIE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on the latest code and make requested changes, otherwise this looks good.

for (let j = 0; j < subtables.length; j++) {
const subtable = subtables[j];
// Subtables not supported come with an error
if (subtable.error) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it log the error when it comes across one?

@Connum Connum added the Spec Related to the implementation of the Opentype specification label Feb 5, 2023
@ILOVEPIE ILOVEPIE mentioned this pull request Feb 5, 2023
@Connum Connum added this to the Release 2.0.0 milestone Feb 5, 2023
@Connum
Copy link
Contributor

Connum commented Feb 15, 2023

Pinging @AlexandreRivet

@rafallyczkowskiadylic
Copy link
Contributor

This will be covered by #557

@Connum Connum force-pushed the feat/gpos-extended-kerning branch from a83fe80 to 995ec63 Compare November 15, 2023 11:45
@Connum
Copy link
Contributor

Connum commented Nov 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Spec Related to the implementation of the Opentype specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants