PHPackages                             finesse/web-fonts-repository - 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. finesse/web-fonts-repository

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

finesse/web-fonts-repository
============================

A simple webfont hosting. Google Fonts alternative for your own fonts.

v0.2.3(6y ago)105909MITPHPPHP &gt;=7.0CI failing

Since Aug 6Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/Finesse/web-fonts-repository)[ Packagist](https://packagist.org/packages/finesse/web-fonts-repository)[ Docs](https://github.com/Finesse/web-fonts-repository)[ Fund](http://money.yandex.ru/to/410012160248971)[ GitHub Sponsors](https://github.com/Finesse)[ RSS](/packages/finesse-web-fonts-repository/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (6)Dependencies (6)Versions (10)Used By (0)

Web fonts repository
====================

[](#web-fonts-repository)

[![Latest Stable Version](https://camo.githubusercontent.com/71e24988f6c969260bce2388f03de3eeb58dffcebf005579c82b56773c932c9e/68747470733a2f2f706f7365722e707567782e6f72672f66696e657373652f7765622d666f6e74732d7265706f7369746f72792f762f737461626c65)](https://packagist.org/packages/finesse/web-fonts-repository)[![Total Downloads](https://camo.githubusercontent.com/5c60183282dc3414ed731d054a7a94bd6a00af2fd35a520dc9e0f3fb5df2c381/68747470733a2f2f706f7365722e707567782e6f72672f66696e657373652f7765622d666f6e74732d7265706f7369746f72792f646f776e6c6f616473)](https://packagist.org/packages/finesse/web-fonts-repository)[![PHP from Packagist](https://camo.githubusercontent.com/a5feb8a966b02020e2cb11862586a279e664c6da4f339d5ebc4edf11177467f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66696e657373652f7765622d666f6e74732d7265706f7369746f72792e737667)](https://camo.githubusercontent.com/a5feb8a966b02020e2cb11862586a279e664c6da4f339d5ebc4edf11177467f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66696e657373652f7765622d666f6e74732d7265706f7369746f72792e737667)[![Test Status](https://github.com/finesse/web-fonts-repository/workflows/Test/badge.svg)](https://github.com/Finesse/web-fonts-repository/actions?workflow=Test)[![Maintainability](https://camo.githubusercontent.com/5723f357b2c80149109e6aaf93e0d48977d1e4d5205bdc32bd67687f31690ee4/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64623066653731643238646634363236313435662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Finesse/web-fonts-repository/maintainability)[![Test Coverage](https://camo.githubusercontent.com/c06a6d959a304f46447261d36171c1163f54a9be1ea02d1e29b7e6e822a52d7b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64623066653731643238646634363236313435662f746573745f636f766572616765)](https://codeclimate.com/github/Finesse/web-fonts-repository/test_coverage)

A simple webfont hosting inspired by [Google Fonts](http://fonts.google.com). It runs on your server, stores and distributes webfont files and generates CSS on-the-go for embedding fonts on web pages.

Quick start
-----------

[](#quick-start)

### Requirements

[](#requirements)

1. HTTP server supporting PHP ≥ 7.0
2. [Composer](http://getcomposer.org) (required for installation)

### Installation

[](#installation)

#### 1. Download the source code

[](#1-download-the-source-code)

Run the following code in the console:

```
composer create-project finesse/web-fonts-repository webfonts
```

Where `webfonts` is a path to a directory where the repository should be installed.

Or you can make some things manually:

1. Download [the source code from GitHub](http://github.com/Finesse/web-fonts-repository/archive/master.zip) and extract it.
2. Open a terminal and go to the source code root.
3. Install the libraries by running in the terminal: ```
    composer install
    ```
4. Prepare the repository by running in the terminal: ```
    composer run-script post-create-project-cmd
    ```

#### 2. File permissions

[](#2-file-permissions)

Give the user behalf which the web server runs permissions to write inside the `logs` directory.

You can just run this in the console:

```
# Don't do it in production!
chmod 777 logs
```

#### 3. Web server

[](#3-web-server)

Make the directory `public` be the document root of the web server. Or just open  if you installed the repository to the web server root.

Make all the requests to not-existing files be handled by `public/index.php`. If your server is Apache, it's already done.

Make the server add the `Access-Control-Allow-Origin: *` HTTP-header to the font files. Otherwise some browsers will reject using fonts from the repository.

- Apache: all you need to do is to make sure that the `mod_header.c` module is on (run the `a2enmod headers` command and restart the server to turn it on).
- Nginx: use [this instruction](http://davidwalsh.name/cdn-fonts).

### Setup

[](#setup)

Put your font files (woff, woff2, ttf, otf, eot, svg) to the `public/fonts` directory. You may separate them by subdirectories. You can convert webfont files using [Transfonter](http://transfonter.org).

All settings go to the file `config/settings-local.php`. If you don't have it, copy it from the file `config/settings-local.php.example`.

Parameters:

#### `displayErrorDetails`

[](#displayerrordetails)

Whether errors details should be sent to browser. Anyway errors are written to the file `logs/app.log`. **You should turn it off on production server.**

#### `logger`/`level`

[](#loggerlevel)

How many messages should be logged to the file. The value is one of the [`\Psr\Log\LogLevel`](http://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#5-psrlogloglevel) constants. You can read more about log levels [here](http://github.com/apix/log#log-levels).

#### `fonts`

[](#fonts)

The list of fonts available in the repository. Simple example:

```
return [
    // ...
    'fonts' => [
        'Open Sans' => [
            'styles' => [
                '300' => 'OpenSans/opensans-light.*',
                '300i' => 'OpenSans/opensans-light-italic.*',
                '400' => 'OpenSans/opensans-regular.*',
                '400i' => 'OpenSans/opensans-regular-italic.*',
            ]
        ],
        'Roboto' => [
            'styles' => [
                '300' => 'Roboto/roboto-light.*',
                '400' => 'Roboto/roboto-regular.*',
                '500' => 'Roboto/roboto-medium.*',
                '700' => 'Roboto/roboto-bold.*',
            ]
        ]
    ]
];
```

The `fonts` array keys are the font families names. The `styles` arrays keys are the styles names. The numbers in the style names are the font weights, `i` stands for italic.

The font file paths are given relative to the `public/fonts` directory. The file paths are the [glob](http://en.wikipedia.org/wiki/Glob_(programming)) search patterns. It means that the repository should consider all files matching the pattern as font files.

You can find more examples and possibilities [here](docs/fonts-setup.md).

### Usage

[](#usage)

Add a `` tag to the HTML code of the page on which you want to embed a font:

```

```

Where `http://web-fonts-repository.local` is the root URL of an installed web fonts repository.

The required fonts are specified the same way as on Google Fonts. Font families are divided by `|`, families styles are divided by `,`, family name is separated from styles list using `:`.

You may omit the styles list. In this case the regular style (`400`) is used.

```

```

You can specify a value for the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)style property using `display` parameter. Example:

```

```

Then embed a font in a CSS code:

```
body {
    font-family: 'Open Sans', sans-serif;
}
```

Versions compatibility
----------------------

[](#versions-compatibility)

The project follows the [Semantic Versioning](http://semver.org).

It means that patch versions are fully compatible (i.e. 1.2.1 and 1.2.2), minor versions are backward compatible (i.e. 1.2.1 and 1.3.2) and major versions are not compatible (i.e. 1.2.1 and 3.0). The pre-release versions (0.\*) are a bit different: patch versions are backward compatible and minor versions are not compatible.

License
-------

[](#license)

MIT. See [the LICENSE](LICENSE) file for details.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance61

Regular maintenance activity

Popularity25

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.3% 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 ~134 days

Recently: every ~215 days

Total

8

Last Release

2312d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9006227?v=4)[Sergey M.](/maintainers/Finesse)[@Finesse](https://github.com/Finesse)

---

Top Contributors

[![Finesse](https://avatars.githubusercontent.com/u/9006227?v=4)](https://github.com/Finesse "Finesse (62 commits)")[![lorodin](https://avatars.githubusercontent.com/u/38944437?v=4)](https://github.com/lorodin "lorodin (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

applicationcssfontsgoogle-fontshostingrepositorywebwebfontcssrepositoryfontwebfontsgoogle fontshosting

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/finesse-web-fonts-repository/health.svg)

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

###  Alternatives

[ecotone/ecotone

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

562565.8k42](/packages/ecotone-ecotone)[oveleon/contao-component-style-manager

Style and CSS-Class Manager for Contao Open Source CMS

2337.6k8](/packages/oveleon-contao-component-style-manager)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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