Download the PHP package dskripchenko/php-pdf-fonts-liberation without Composer
On this page you can find all versions of the php package dskripchenko/php-pdf-fonts-liberation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dskripchenko/php-pdf-fonts-liberation
More information about dskripchenko/php-pdf-fonts-liberation
Files in dskripchenko/php-pdf-fonts-liberation
Package php-pdf-fonts-liberation
Short Description Liberation font family bundle for dskripchenko/php-pdf. Metric-compatible with Arial / Times New Roman / Courier New. SIL OFL 1.1 fonts + MIT wrapper.
License MIT OFL-1.1
Homepage https://github.com/dskripchenko/php-pdf-fonts-liberation
Informations about the package php-pdf-fonts-liberation
dskripchenko/php-pdf-fonts-liberation
Liberation font family bundle for
dskripchenko/php-pdf —
ships 12 TTFs (Sans / Serif / Mono × Regular / Bold / Italic /
Bold Italic) and a ready-to-use FontProvider implementation.
🌐 English · 中文
Why a separate package
dskripchenko/php-pdf is MIT-licensed. The Liberation fonts ship under
the SIL Open Font License (OFL) 1.1, which is permissive and
GPL-compatible but distinct from MIT (different naming rules for
derivatives, different redistribution clauses). Keeping fonts in a
separate package:
- isolates the OFL license zone from the MIT zone;
- lets callers opt out of the ~4 MB font bundle when they ship their own fonts;
- enables future sibling packages (
php-pdf-fonts-noto,php-pdf-fonts-roboto, etc.) without changing the core.
What's bundled
Liberation Fonts 2.1.5 (latest stable), 12 files in assets/fonts/:
| Family | Variants |
|---|---|
| LiberationSans | Regular, Bold, Italic, BoldItalic |
| LiberationSerif | Regular, Bold, Italic, BoldItalic |
| LiberationMono | Regular, Bold, Italic, BoldItalic |
The Liberation family is metric-compatible with Microsoft's proprietary fonts — text laid out for Arial / Times New Roman / Courier New will render with the same line wrapping using the Liberation equivalent, so DOCX-input → PDF and HTML-templates → PDF workflows produce identical pagination.
Glyph coverage: full Latin (Western and Eastern European), Cyrillic, Greek, Hebrew, Arabic, and Devanagari basics.
Installation
PHP 8.2+. No native extensions required.
Usage
Microsoft name aliasing
LiberationFontProvider resolves common proprietary names to their
metric-compatible Liberation equivalent automatically:
| Requested name | Resolved to |
|---|---|
Arial |
LiberationSans |
Arial-Bold |
LiberationSans-Bold |
Times New Roman |
LiberationSerif |
Times New Roman-Italic |
LiberationSerif-Italic |
Courier New |
LiberationMono |
A template that says font-family: "Times New Roman" works out of
the box.
Combining with system or custom fonts
Use Dskripchenko\PhpPdf\Font\ChainedFontProvider to stack providers
so Liberation acts as a fallback for missing glyphs:
License
This package mixes two licenses:
| Zone | License |
|---|---|
src/ (PHP wrapper) |
MIT — see LICENSE |
assets/fonts/ TTFs |
SIL OFL 1.1 — see OFL.txt |
Both are permissive, GPL-compatible, and allow commercial use.
Attribution
Liberation Fonts © Red Hat, Inc., Pavel Hlaváč, and others. Upstream: https://github.com/liberationfonts/liberation-fonts