Download the PHP package phil/fonts-bundle without Composer

On this page you can find all versions of the php package phil/fonts-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fonts-bundle

phil/fonts-bundle

The font files of a Symfony application, read once: their @font-face rules, their licences checked by a command, and the same fonts handed to the PDF writer.

phil/fonts-bundle puts phil/fonts in a Symfony application. It reads a directory of font files — TrueType, OpenType, collections, WOFF and, when ext-brotli is loaded, WOFF2 — into a catalogue of faces with their family, weight, style, embedding permissions and licence. From it the bundle writes the @font-face rules of the directory, one rule per face with each of its files listed smallest first, for a stylesheet or a template; keeps a licence register beside the fonts and lists, in a command that fails a build, every file added, removed or changed since its licence was last checked; and hands the TrueType faces to the native PDF writer of phil/paged-media and reads the fonts uploaded to phil/media-bundle.

Without ext-brotli, WOFF2 files cannot be read: they stay in the catalogue with that reason, the commands say so plainly, and their WOFF, TrueType or OpenType siblings give the metadata — the WOFF2 file is still served first in the @font-face rule, since the browser reads it.

It is for any Symfony application that serves fonts it did not draw: a site that self-hosts its typefaces, a print or e-book pipeline that embeds them, a build that must not ship a font nobody checked the licence of.

It is a bundle built on symfony/config, symfony/dependency-injection, symfony/console and symfony/filesystem. Twig, phil/paged-media and phil/media-bundle are optional: each integration is registered when its package is installed.

The design is small: FontFiles reads a file with the Brotli decompressor PHP has, FontCatalogue holds the files of the directory, FontFaces writes their rules, Licences compares them with the register, three commands and a Twig function expose them, and PdfFonts and MediaFonts connect the other packages.

Status

Part State
Configuration: directory, public path, font-display, licence register Implemented and tested
FontFiles: WOFF2 read when ext-brotli is loaded, a clear message otherwise Implemented and tested
FontCatalogue: files by path, faces by family, weight and style, unreadable files with their reason Implemented and tested
FontFaces: one rule per face, its files smallest first, URLs under the public path Implemented and tested
Licences and phil:fonts:licences: the register kept as JSON, files to check, --write Implemented and tested
phil:fonts:list, phil:fonts:css and fonts_css() Implemented and tested
PdfFonts for phil/paged-media, MediaFonts for phil/media-bundle Implemented and tested

Documentation

Document What it covers
Installation Requirements, installing and enabling the bundle, and ext-brotli.
Configuration Every option, and the services it gives.
The catalogue FontFiles, FontCatalogue and CatalogueEntry: reading, WOFF2, finding a face.
@font-face rules FontFaces, phil:fonts:css and fonts_css().
Licences Licences and phil:fonts:licences: the register, the files to check, a build that stops.
Commands The three commands, their options and exit codes.
Integrations PdfFonts for the native PDF writer, MediaFonts for the media library.
Extension points The services an application relies on, replaces or decorates.
Exceptions What the bundle throws, beside the library's exceptions.
Testing The bundle's tests, and testing an application that uses it.
Reference Every class and service of the bundle.

Quick start

Requirements

PHP 8.5 or later, Symfony 8.2 and phil/fonts; ext-brotli to read WOFF2 files; Twig for fonts_css(); phil/paged-media for PdfFonts; phil/media-bundle for MediaFonts.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of fonts-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
phil/fonts Version ^0.1@dev
symfony/config Version ^8.2
symfony/console Version ^8.2
symfony/dependency-injection Version ^8.2
symfony/filesystem Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phil/fonts-bundle contains the following files

Loading the files please wait ...