-
Notifications
You must be signed in to change notification settings - Fork 477
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
GSUB lookup table type 7 subtable format 1 #486
GSUB lookup table type 7 subtable format 1 #486
Conversation
The tests don't use actual font files to run (see 3177c13 for example), so it would be great if you could add (a) test case(s) to your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires test(s)
I just added a PR FilamentGames#2 to the feature branch that adds a test for this parsing feature. @st0nerhat, could you please merge that so we can get this PR merged? |
As I provided the test, a different reviewer should make a review as well, so I tagged @ILOVEPIE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, apart from the fact that we're still uncertain on the tests/no examples in the microsoft documentation, perhaps we should check how libfreetype handles it?
The functionality is relatively straight-forward. I tried looking at libfreetype, but I didn't know where to look exactly. In my opinion, the test that we have now should be sufficient. |
I haven't come across a better stripped down example for a test, but I didn't come across any problems either so far, so I'm merging this now. |
Description
In featureQuery.js:chainingSubstitutionFormat3
In featureQuery.js:FeatureQuery.prototype.lookupFeature
Same changes as above.
Motivation and Context
Addresses issue #415
GSUB tables have a lookup table type 7 called the Extension Substitution Subtable. Only one format officially exists (format 1).
See the OpenType spec page.
Per the spec, Extension tables are used in fonts that use a large number of substitution subtables. Fonts for scripts where letters are connected are a situation where many substitutions are needed.
How Has This Been Tested?
So far I have tested this on 3 custom fonts in my library, one of which contains type 7 lookup tables and 2 that do not. Unfortunately I do not have the license to upload these fonts in the PR.
Screenshots (if appropriate):
Types of changes
Checklist:
npm run test
and all tests passed green (including code styling checks).