kontur / fontsampler-wordpress-plugin

A Wordpress plugin that let's users interactively preview and test webfonts
http://fontsampler.johannesneumeier.com
GNU General Public License v3.0
38 stars 8 forks source link

Refactor Opentype.js and specimen-tools dependency out #153

Open kontur opened 5 years ago

kontur commented 5 years ago

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 commented 4 years ago

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