fontsampler-wordpress-plugin icon indicating copy to clipboard operation
fontsampler-wordpress-plugin copied to clipboard

Refactor Opentype.js and specimen-tools dependency out

Open kontur opened this issue 5 years ago • 1 comments

Probably the biggest single refactor issue in the plugin lifetime so far.

The reliance on Opentype.js and specimen-tools is a huge performance impact (150kb), fonts loaded as sometimes not-cached AJAX requests. Furthermore, many aspects of specimen-tools that rely on the automatic Opentype.js font extraction cause problems or require Fontsampler specific overwrites where browser limitations or (admin) user input (settings, font names, font files) is not ideal. The main feature that cannot be replicated without Opentype.js is the automatic Opentype support, but that, too, might be nicer to implement as a feature where specific Opentype features are excplicitly enabled on a per-font or per-fontsampler basis.

At that same time this could facilitate a refactor of the Fontsampler javascript to exclude also the jQuery dependency to make the codebase wider applicable for standalone projects.

kontur avatar Mar 18 '19 08:03 kontur

Work on this is started in the fontsampler-js branch, but this requires still a whole bunch of refinement.

kontur avatar Feb 07 '20 13:02 kontur