PHPackages                             kaiseki/wp-font-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kaiseki/wp-font-loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kaiseki/wp-font-loader
======================

Register and render @font-face stylesheets in WordPress, with preload, variable-font and exclusion filters

1.0.0(2mo ago)0894MITPHPPHP ^8.2CI passing

Since Jun 1Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/kaisekidev/kaiseki-wp-font-loader)[ Packagist](https://packagist.org/packages/kaiseki/wp-font-loader)[ Docs](https://github.com/kaisekidev/kaiseki-wp-font-loader)[ RSS](/packages/kaiseki-wp-font-loader/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (16)Versions (3)Used By (0)

kaiseki/wp-font-loader
======================

[](#kaisekiwp-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
------------

[](#installation)

```
composer require kaiseki/wp-font-loader
```

Requires PHP 8.2 or newer.

Usage
-----

[](#usage)

Register `ConfigProvider` with your laminas-style config aggregator and configure the `font_loader`key:

```
use Kaiseki\WordPress\FontLoader\FontFaceInterface;
use Kaiseki\WordPress\FontLoader\FontFaceRegistry;
use Kaiseki\WordPress\FontLoader\FontFaceFilter\PreloadFilter;
use Kaiseki\WordPress\FontLoader\FontFaceFilter\VariableFontFilter;

return [
    'font_loader' => [
        // FontFaceFilterInterface instances/class-strings applied to every parsed face.
        'filter' => [
            PreloadFilter::class,
            new VariableFontFilter(weight: '100 900'),
        ],
        'path_loader' => [
            // Directories scanned for font files.
            'paths' => [
                get_stylesheet_directory() . '/assets/fonts',
            ],
            // Where the @font-face CSS is printed.
            'locations' => [
                FontFaceInterface::FRONTEND,
                FontFaceInterface::BACKEND,
                FontFaceInterface::LOGIN,
            ],
            'display'            => 'swap',
            'without_domain'     => false,
            'include_subfolders' => false,
        ],
    ],
    'hook' => [
        'provider' => [
            FontFaceRegistry::class,
        ],
    ],
];
```

`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 `FontFaceFilterInterface`s can adjust each face (`PreloadFilter`, `VariableFontFilter`) or drop it (`ExcludeFromLoadingFilter`, by returning `null`).

Development
-----------

[](#development)

```
composer install
composer check   # check-deps, cs-check, phpstan
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

78d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c3a6b11aea9668c9e9ca0c0f8515ef114d344acb552c695d715d35d5b388ea4?d=identicon)[woda](/maintainers/woda)

---

Top Contributors

[![davidmondok](https://avatars.githubusercontent.com/u/3883758?v=4)](https://github.com/davidmondok "davidmondok (12 commits)")[![wolfgangschaefer](https://avatars.githubusercontent.com/u/26325205?v=4)](https://github.com/wolfgangschaefer "wolfgangschaefer (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kaiseki-wp-font-loader/health.svg)

```
[![Health](https://phpackages.com/badges/kaiseki-wp-font-loader/health.svg)](https://phpackages.com/packages/kaiseki-wp-font-loader)
```

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k464.3M10.6k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

707133.3M15.2k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31083.8M2.5k](/packages/illuminate-container)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k52.2M378](/packages/api-platform-core)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M294](/packages/deptrac-deptrac)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

568591.1k63](/packages/ecotone-ecotone)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
