opentype.js icon indicating copy to clipboard operation
opentype.js copied to clipboard

The variable font code uses Proxy, a non-polyfillable ES6 type.

Open ILOVEPIE opened this issue 9 months ago • 7 comments

The variable font code uses Proxy, a non-polyfillable ES6 type, preventing opentype.js from being transpiled to anything lower than ES6.

Expected Behavior

In order to implement a legacy/compatibility build this code must be reworked slightly to remove the dependence on Proxy.

Current Behavior

While most JavaScript features can be polyfilled for older browsers, proxy is one of the few that cannot. Even SWC and Closure Compiler cannot polyfill this feature.

Possible Solution

Don't use Proxy, it doesn't add any significant amount of code to avoid it.

Context

This is blocking #693

ILOVEPIE avatar May 19 '24 21:05 ILOVEPIE