PHPackages                             digbang/fonts - 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. digbang/fonts

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

digbang/fonts
=============

Helpers to build icons for multiple (and custom) sources.

v2.3.0(2mo ago)033.2k↓47.9%1MITPHPPHP ^7.4 || ^8.0.2

Since Mar 23Pushed 2mo ago38 watchersCompare

[ Source](https://github.com/digbang/fonts)[ Packagist](https://packagist.org/packages/digbang/fonts)[ RSS](/packages/digbang-fonts/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (2)Versions (13)Used By (0)

Digbang/Fonts
=============

[](#digbangfonts)

Helper class to create Font icons with a predefined markup.

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

[](#installation)

Download through composer:

```
composer require digbang/fonts

```

Add the service provider and facade to your `config/app.php`:

```
'providers' => [
    // ...
    Digbang\Fonts\FontsServiceProvider::class,

],

'aliases' => [
    // ...
    'Fonts' => Digbang\Fonts\Facade::class,
],
```

Publish the config file:

```
php artisan vendor:publish --provider Digbang\\Fonts\\FontsServiceProvider

```

Usage
-----

[](#usage)

### Through the facade

[](#through-the-facade)

```
// The `icon` function will use the configured icon prefix (defaults to "fa")
Fonts::icon('icon', 'extra-class') //
```

Package provides "fa" and "mat" as helper method for [Font Awesome](http://fontawesome.io/) and [Material Design](http://zavoloklom.github.io/material-design-iconic-font/icons.html) icons.

```
Fonts::fa()->icon('icon', ['class' => 'extra-class']) //
Fonts::mat()->icon('icon', ['class' => 'extra-class']) //
```

### Through the helper function

[](#through-the-helper-function)

```
icon('foo'); //
fa('icon', 'extra-class') //
mat('icon', ['class' => 'extra-class']) //
```

### HTML Attributes

[](#html-attributes)

You can also add any other attributes to the html.

```
fa('times', ['title' => 'Delete this!']) //
```

### Inner content

[](#inner-content)

An icon can have inner content:

```
fa('times', 'text-hide')->withContent("Remove element");

// FontAwesome stacks
fa('stack', 'fa-lg')->withContent(
    fa('circle', 'fa-stack-2x') .
    fa('flag', 'fa-stack-1x fa-inverse')
);
```

### Changing the tag

[](#changing-the-tag)

You can change the tag used by the library.

```
// Setting a new default tag to all fonts
Fonts::setDefaultTag('span');
fa('edit'); //

// Setting a tag on each use
Fonts::fa()->withTag('span')->icon('times'); //
```

### Extending the factory

[](#extending-the-factory)

The `Digbang\Fonts\FontManager` can be extended with macros:

```
Fonts::macro('digbang', function () {
    return $this->create('db');
});

Fonts::digbang()->icon('foo'); //
```

### Standalone usage

[](#standalone-usage)

Non-Laravel projects can still use this, but the Facade and helper function won't be available.

```
$fonts = new Digbang\Fonts\Factory('fa');
$fonts->setDefaultTag('span');

$fonts->icon('times', 'text-danger'); //
$fonts->mat()->icon('times', 'text-danger'); //
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~332 days

Recently: every ~381 days

Total

11

Last Release

64d ago

Major Versions

v0.4.0 → v1.0.02022-02-23

v1.0.0 → v2.0.02026-04-23

PHP version history (4 changes)0.1.1PHP &gt;=7.0.0

v0.3.0PHP ^7.3

v0.4.0PHP ^7.3|^8.0

v1.0.0PHP ^7.4 || ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/815bc7d874ad7abe1cbc64eb03ac8931f16f9a5f0795d6d73399d0d7003afb5f?d=identicon)[demiansc](/maintainers/demiansc)

![](https://avatars.githubusercontent.com/u/5347955?v=4)[Dario Govergun](/maintainers/dpgover)[@dpgover](https://github.com/dpgover)

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

---

Top Contributors

[![guiwoda](https://avatars.githubusercontent.com/u/1625545?v=4)](https://github.com/guiwoda "guiwoda (8 commits)")[![falmadarivero](https://avatars.githubusercontent.com/u/92588624?v=4)](https://github.com/falmadarivero "falmadarivero (6 commits)")[![dpgover](https://avatars.githubusercontent.com/u/5347955?v=4)](https://github.com/dpgover "dpgover (4 commits)")[![sojeda](https://avatars.githubusercontent.com/u/17851841?v=4)](https://github.com/sojeda "sojeda (4 commits)")[![marianofilipoff](https://avatars.githubusercontent.com/u/17851999?v=4)](https://github.com/marianofilipoff "marianofilipoff (2 commits)")[![riedelalejandro](https://avatars.githubusercontent.com/u/11334068?v=4)](https://github.com/riedelalejandro "riedelalejandro (1 commits)")

### Embed Badge

![Health badge](/badges/digbang-fonts/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M280](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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