fontsampler-wordpress-plugin
fontsampler-wordpress-plugin copied to clipboard
Refactor Opentype.js and specimen-tools dependency out
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.
Work on this is started in the fontsampler-js
branch, but this requires still a whole bunch of refinement.