PHPackages                             codercms/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. codercms/php-font-lib

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

codercms/php-font-lib
=====================

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

0.5.5(6y ago)0977LGPL-3.0PHP

Since Nov 13Pushed 6y agoCompare

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

READMEChangelog (4)Dependencies (1)Versions (14)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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75.6% 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 ~224 days

Recently: every ~231 days

Total

13

Last Release

2245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/41348018d9b5a065cd3f4ae969e40f8a50b8e14317723847f609704e790c49e8?d=identicon)[codercms](/maintainers/codercms)

---

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)")[![codercms](https://avatars.githubusercontent.com/u/4526911?v=4)](https://github.com/codercms "codercms (2 commits)")[![chumanfu](https://avatars.githubusercontent.com/u/2536603?v=4)](https://github.com/chumanfu "chumanfu (2 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)")[![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)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[myweishanli/yii2-ip2location

Yii2 Ip to Location

311.8k2](/packages/myweishanli-yii2-ip2location)

PHPackages © 2026

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