PHPackages                             dnru/php-font-lib - 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. dnru/php-font-lib

ActiveLibrary

dnru/php-font-lib
=================

A library to read, parse, export and make subsets of different types of font files.

0.5.2(6y ago)0303LGPL-3.0PHP

Since Nov 13Pushed 5y agoCompare

[ Source](https://github.com/dnru/php-font-lib)[ Packagist](https://packagist.org/packages/dnru/php-font-lib)[ Docs](https://github.com/PhenX/php-font-lib)[ RSS](/packages/dnru-php-font-lib/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

PHP Font Lib
============

[](#php-font-lib)

[![Build Status](https://camo.githubusercontent.com/b27c95f0359f40562a644bc4545c11e4aae9a120efcc1ec8f29fa0398aedba36/68747470733a2f2f7472617669732d63692e6f72672f5068656e582f7068702d666f6e742d6c69622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PhenX/php-font-lib)

This library can be used to:

- Read TrueType, OpenType (with TrueType glyphs), WOFF font files
- Extract basic info (name, style, etc)
- Extract advanced info (horizontal metrics, glyph names, glyph shapes, etc)
- Make an Adobe Font Metrics (AFM) file from a font

You can find a demo GUI [here](http://pxd.me/php-font-lib/www/font_explorer.html).

This project was initiated by the need to read font files in the [DOMPDF project](https://github.com/dompdf/dompdf).

Usage Example
-------------

[](#usage-example)

```
$font = \FontLib\Font::load('../../fontfile.ttf');
$font->parse();  // for getFontWeight() to work this call must be done first!
echo $font->getFontName() .'';
echo $font->getFontSubfamily() .'';
echo $font->getFontSubfamilyID() .'';
echo $font->getFontFullName() .'';
echo $font->getFontVersion() .'';
echo $font->getFontWeight() .'';
echo $font->getFontPostscriptName() .'';

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.2% 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 ~297 days

Recently: every ~545 days

Total

10

Last Release

2258d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66252826?v=4)[dnru](/maintainers/dnru)[@dnru](https://github.com/dnru)

---

Top Contributors

[![PhenX](https://avatars.githubusercontent.com/u/42170?v=4)](https://github.com/PhenX "PhenX (99 commits)")[![BernardoSilva](https://avatars.githubusercontent.com/u/1537510?v=4)](https://github.com/BernardoSilva "BernardoSilva (8 commits)")[![mondrake](https://avatars.githubusercontent.com/u/1174864?v=4)](https://github.com/mondrake "mondrake (4 commits)")[![pocketarc](https://avatars.githubusercontent.com/u/5393?v=4)](https://github.com/pocketarc "pocketarc (4 commits)")[![u01jmg3](https://avatars.githubusercontent.com/u/1266205?v=4)](https://github.com/u01jmg3 "u01jmg3 (3 commits)")[![chumanfu](https://avatars.githubusercontent.com/u/2536603?v=4)](https://github.com/chumanfu "chumanfu (2 commits)")[![LinkingYou](https://avatars.githubusercontent.com/u/23259908?v=4)](https://github.com/LinkingYou "LinkingYou (1 commits)")[![lonnylot](https://avatars.githubusercontent.com/u/656791?v=4)](https://github.com/lonnylot "lonnylot (1 commits)")[![Magoja](https://avatars.githubusercontent.com/u/4168858?v=4)](https://github.com/Magoja "Magoja (1 commits)")[![amacneil](https://avatars.githubusercontent.com/u/637671?v=4)](https://github.com/amacneil "amacneil (1 commits)")[![winternet-studio](https://avatars.githubusercontent.com/u/5200270?v=4)](https://github.com/winternet-studio "winternet-studio (1 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (1 commits)")[![bsweeney](https://avatars.githubusercontent.com/u/485897?v=4)](https://github.com/bsweeney "bsweeney (1 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (1 commits)")[![chris-at-netshake](https://avatars.githubusercontent.com/u/19650557?v=4)](https://github.com/chris-at-netshake "chris-at-netshake (1 commits)")[![dnru](https://avatars.githubusercontent.com/u/66252826?v=4)](https://github.com/dnru "dnru (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dnru-php-font-lib/health.svg)

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

PHPackages © 2026

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