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

classify glyphset #497

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jimmywarting
Copy link

Description

Motivation and Context

part of #247 as a modernization

How Has This Been Tested?

npm run test

Screenshots (if appropriate):

Types of changes

  • Refactor to modern code (no behaviour changes)

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.

@ILOVEPIE
Copy link
Contributor

ILOVEPIE commented Feb 4, 2023

@Connum The question is though, do we want to switch to classes? This breaks compatibility with legacy browsers, especially in the standalone non-npm versions of opentype.js. Some applications may depend on opentype.js for polyfilling webfonts in legacy browsers, which means that we'd be breaking those polyfills. Maybe there's a compiler pass we could apply to convert from classes to functions or from classes to Object.create when compiling non-npm versions?

@ILOVEPIE
Copy link
Contributor

ILOVEPIE commented Feb 4, 2023

As long as we can keep it ES5 compatable I don't see an issue, but we need to make sure we can do that.

@Connum
Copy link
Contributor

Connum commented Feb 4, 2023

Doesn't rollup with the buble and commonjs plugins make sure that everything's compiled the way we need it to? I haven't used rollup in myself projects before and haven't looked into it more deeply yet, but that's what I understood from a quick glance at it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants