PHPackages                             apsonex/font - 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. apsonex/font

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

apsonex/font
============

Font

1.0.6(2mo ago)09551MITPHPPHP ^8.2|^8.3|^8.4|^8.5

Since May 26Pushed 2mo agoCompare

[ Source](https://github.com/apsonex/font)[ Packagist](https://packagist.org/packages/apsonex/font)[ Docs](https://github.com/apsonex/font)[ RSS](/packages/apsonex-font/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (10)Versions (8)Used By (1)

Font Manager PHP Package
========================

[](#font-manager-php-package)

A simple PHP package to manage and search fonts from multiple providers. Currently supports the **Bunny Fonts** provider with an easy way to list, search, and filter fonts.

Features
--------

[](#features)

- List fonts with pagination
- Search fonts by keyword
- Find fonts by key(s), family(ies), and type
- Extensible with multiple font providers

Installation
------------

[](#installation)

```
composer require apsonex/font-manager
```

Usage
-----

[](#usage)

```
use Apsonex\Font\Font;

// Instantiate the font manager
$fontManager = Font::make();

// Select Bunny provider
$fontManager->bunny();

// List fonts (paginated)
$response = $fontManager->list(limit: 20, page: 1);
foreach ($response->fonts as $font) {
    echo $font->family . PHP_EOL;
}

// Search fonts by keyword
$searchResponse = $fontManager->search('abo', limit: 20, page: 1);

// Find font by a single key
$font = $fontManager->findByKey('abel');

// Find fonts by multiple keys
$response = $fontManager->findByKeys(['abel', 'abeezee'], limit: 10);

// Find fonts by family
$response = $fontManager->findByFamily('Abel', limit: 10);

// Find fonts by multiple families
$response = $fontManager->findByFamilies(['Abel', 'Aboreto'], limit: 10);

// Find fonts by type (e.g., 'sans-serif')
// Use limit -1 to fetch all matches
$response = $fontManager->findByType('sans-serif', limit: -1);
```

API Reference
-------------

[](#api-reference)

### Font Manager `(Apsonex\Font\Font)`

[](#font-manager-apsonexfontfont)

- make(): static — Create a new instance
- bunny(): static — Use Bunny font provider
- useProvider(FontProviderInterface $provider): static — Use a custom font provider
- list(int $limit = 20, int $page = 1): FontResponse — List fonts paginated
- search(string $keyword, int $limit = 20, int $page = 1): FontResponse — Search fonts by keyword
- findByKey(string $key): ?FontDTO — Find a single font by key
- findByKeys(array $keys, int $limit = 20): FontResponse — Find fonts by keys
- findByFamily(string $family, int $limit = 20): FontResponse — Find fonts by family
- findByFamilies(array $families, int $limit = 20): FontResponse — Find fonts by families
- findByType(string $type, int $limit = -1): FontResponse — Find fonts by category/type

### FontDTO `(Apsonex\Font\FontDTO)`

[](#fontdto-apsonexfontfontdto)

- Represents a single font object with these properties:
- key (string): Unique font key
- provider (string): Provider name
- category (string): Font category (e.g., sans-serif)
- family (string): Font family name
- urlString (string): CSS font string identifier

The `FontDTO` class represents a single font item with key metadata used across the package.

PropertyTypeDescriptionExample`key`stringUnique identifier for the font`"abeezee"``provider`stringThe font provider source`"bunny"``category`stringFont category/type (e.g., serif, sans-serif)`"sans-serif"``family`stringThe font family name`"ABeeZee"``urlString`stringA URL-friendly CSS font string used for loading`"abeezee:400,400i"````
use Apsonex\Font\FontDTO;

// Creating a FontDTO object (usually returned from provider methods)
$font = new FontDTO(
    key: 'abeezee',
    provider: 'bunny',
    category: 'sans-serif',
    family: 'ABeeZee',
    urlString: 'abeezee:400,400i'
);

// Accessing properties
echo "Font Key: " . $font->key . PHP_EOL;             // Output: abeezee
echo "Provider: " . $font->provider . PHP_EOL;        // Output: bunny
echo "Category: " . $font->category . PHP_EOL;        // Output: sans-serif
echo "Family: " . $font->family . PHP_EOL;            // Output: ABeeZee
echo "CSS URL String: " . $font->urlString . PHP_EOL; // Output: abeezee:400,400i
```

FontResponse `(Apsonex\Font\FontResponse)`
------------------------------------------

[](#fontresponse-apsonexfontfontresponse)

- Paginated font response containing:
- fonts (array of FontDTO)
- total (int) — total matched fonts
- limit (int) — items per page
- page (int) — current page number

Testing
-------

[](#testing)

This package uses Pest PHP for testing.

```
./vendor/bin/pest
```

Extending with other Providers
------------------------------

[](#extending-with-other-providers)

You can implement your own provider by creating a class that implements:

```
use Apsonex\Font\Contracts\FontProviderInterface;

class YourProvider implements FontProviderInterface
{
    public function list(int $limit, int $page): FontResponse { /*...*/ }
    public function search(string $keyword, int $limit, int $page): FontResponse { /*...*/ }
    public function findByKey(string $key): ?FontDTO { /*...*/ }
    // Implement other methods from interface...
}
```

Then register it:

```
    $fontManager->useProvider(new YourProvider());
```

License
-------

[](#license)

MIT License © Apsonex Inc

Contributing
------------

[](#contributing)

Feel free to open issues and pull requests!

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance86

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~54 days

Recently: every ~81 days

Total

7

Last Release

70d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.0.6PHP ^8.2|^8.3|^8.4|^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/73299554?v=4)[Apsonex Inc.](/maintainers/apsonex)[@apsonex](https://github.com/apsonex)

---

Top Contributors

[![gurindersingh](https://avatars.githubusercontent.com/u/6223752?v=4)](https://github.com/gurindersingh "gurindersingh (8 commits)")

---

Tags

fontapsonex

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/apsonex-font/health.svg)

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

###  Alternatives

[fortawesome/font-awesome

The iconic font, CSS, and SVG framework

76.7k7.5M141](/packages/fortawesome-font-awesome)[kartik-v/bootstrap-star-rating

A simple yet powerful JQuery star rating plugin for Bootstrap.

1.1k4.6M5](/packages/kartik-v-bootstrap-star-rating)[rmrevin/yii2-fontawesome

Asset Bundle for Yii2 with Font Awesome

1474.2M135](/packages/rmrevin-yii2-fontawesome)[kartik-v/yii2-icons

Set of icon frameworks for use in Yii Framework 2.0

691.0M34](/packages/kartik-v-yii2-icons)[swissup/module-font-awesome

FontAwesome for Magento2

117.1k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

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