-
Notifications
You must be signed in to change notification settings - Fork 501
Parsing and writing support for variable font tables fvar, STAT and avar #576
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
Conversation
very nice addition 👍 |
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.
LGTM 🚀
don't forget to fix the import
paths before merging 👍
You'll have to approve again before I can merge. |
f815010
to
475d8db
Compare
475d8db
to
c17aa88
Compare
@Connum I rebase-squashed your All lint+test are now passing. You can merge when you are okay (I can't since I'm the last committer) |
Node / Deno implicitly lookup import with
|
I can't approve because I'm the PR author! @ILOVEPIE? :) |
I'm all for that! |
I just added the plugin and configured it, but strangely while VSCode does indeed show red lines under missing file extensions for import statements, the |
maybe the best testing would be to have in CI a chrome-headless test that import the /src/opentype.js :) |
I just added #584 with a custom eslint rule for enforcing file extensions in import paths. |
Description
encode.F2DOT14
encode.FLOAT
as a wrapper toencode.FIXED
when handling actual float numbersfvar
writing to new platform-agnostic names structure (see Preserve platform specific names in fonts. #542)fvar
table not being written (fix fvar table is parsed and can be generated, but is never actually written to a file #573)STAT
avar
Motivation and Context
This PR lays the groundwork for variable fonts support. Actual coordinate scaling and normalization (see https://learn.microsoft.com/en-us/typography/opentype/spec/otvaroverview#CSN) for rendering is not yet implemented, but several tables needed for supporting it can now be parsed and written.
I decided against also implementing
gvar
, because it introduces a set of new concepts/data types and seems to be the most complex of them. That would have bloated the PR even more.Further resources for future rendering implementation:
How Has This Been Tested?
Loading and saving different variable fonts, added tests.
Screenshots (if appropriate):
Types of changes
Checklist:
npm run test
and all tests passed green (including code styling checks).