Download the PHP package kaiseki/wp-font-loader without Composer
On this page you can find all versions of the php package kaiseki/wp-font-loader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaiseki/wp-font-loader
More information about kaiseki/wp-font-loader
Files in kaiseki/wp-font-loader
Package wp-font-loader
Short Description Register and render @font-face stylesheets in WordPress, with preload, variable-font and exclusion filters
License MIT
Homepage https://github.com/kaisekidev/kaiseki-wp-font-loader
Informations about the package wp-font-loader
kaiseki/wp-font-loader
Register and render @font-face stylesheets in WordPress, with preload, variable-font and exclusion filters.
Point it at a directory of font files; it parses each filename into a FontFace (family, weight,
style, …), applies any configured filters, and renders the @font-face CSS for the chosen locations
(front end, admin, login). Wired through ConfigProvider and the font_loader config key.
Installation
Requires PHP 8.2 or newer.
Usage
Register ConfigProvider with your laminas-style config aggregator and configure the font_loader
key:
ConfigProvider wires FontFaceRegistry (the hook provider), a PathLoader (LoaderInterface) that
scans the configured paths, and a FontFilenameParser (FontFilenameParserInterface). Filenames are
parsed into FontFace value objects; the configured FontFaceFilterInterfaces can adjust each face
(PreloadFilter, VariableFontFilter) or drop it (ExcludeFromLoadingFilter, by returning null).
Development
License
MIT — see LICENSE.
All versions of wp-font-loader with dependencies
kaiseki/config Version ^2.0
kaiseki/wp-hook Version ^2.0
psr/container Version ^1.1 || ^2.0