Download the PHP package apsonex/font without Composer
On this page you can find all versions of the php package apsonex/font. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor apsonex
Package font
Short Description Font
License MIT
Homepage https://github.com/apsonex/font
Package font
Short Description Font
License MIT
Homepage https://github.com/apsonex/font
Please rate this library. Is it a good library?
Informations about the package font
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
- List fonts with pagination
- Search fonts by keyword
- Find fonts by key(s), family(ies), and type
- Extensible with multiple font providers
Installation
Usage
API Reference
Font Manager (Apsonex\Font\Font)
- 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)
- 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.
| Property | Type | Description | Example |
|---|---|---|---|
key |
string | Unique identifier for the font | "abeezee" |
provider |
string | The font provider source | "bunny" |
category |
string | Font category/type (e.g., serif, sans-serif) | "sans-serif" |
family |
string | The font family name | "ABeeZee" |
urlString |
string | A URL-friendly CSS font string used for loading | "abeezee:400,400i" |
FontResponse (Apsonex\Font\FontResponse)
- Paginated font response containing:
- fonts (array of FontDTO)
- total (int) — total matched fonts
- limit (int) — items per page
- page (int) — current page number
Testing
This package uses Pest PHP for testing.
Extending with other Providers
You can implement your own provider by creating a class that implements:
Then register it:
License
MIT License © Apsonex Inc
Contributing
Feel free to open issues and pull requests!
All versions of font with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2|^8.3|^8.4|^8.5
The package apsonex/font contains the following files
Loading the files please wait ...