Download the PHP package alto/font without Composer

On this page you can find all versions of the php package alto/font. 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 font

ALTO Font

Inspect, convert, and subset font files from PHP. Read a font's family and style, find a matching face, or keep only the characters your application uses.

  PHP Version   CI   Packagist   License   GitHub Sponsors

Installation

Requires PHP 8.4+, Iconv, and Zlib. Reading WOFF2 also needs the Brotli PHP extension or executable; writing WOFF2 requires an explicit compressor. TTF and WOFF examples need no Brotli dependency.

Read a font

Save this as inspect.php, place your font at fonts/Inter-Regular.ttf, and run php inspect.php:

For Inter Regular, this prints Inter Regular. See Getting started to check which characters it contains.

Create a smaller font for your text

Create an output directory first. Run this as a separate script beside your vendor directory. The destination must not already exist.

This creates a WOFF file containing the requested characters available in the source, plus required glyph dependencies. The original file is unchanged. Use the full text your application needs: later text may contain characters excluded from this subset. Read Create a subset for missing-character checks, output sizes, and options.

The illustrated subset uses the text above and default options. The exact size depends on the source font and the selected characters.

Choose a task

I want to... Guide
Understand files, faces, characters, and glyphs Font concepts
Read a font's family, style, or license fields Read metadata
Check whether a font contains my characters Getting started
Inspect files, metadata, glyphs, and variations Inspect fonts
Convert a font to TTF, WOFF, or WOFF2 Convert a font
Reduce a font to the text I use Create a subset
Find a font by family, weight, and style Find a font
Inspect variable-font axes and glyph measurements Variable fonts
Check supported containers and outline formats Font formats

The documentation index lists every main guide.

Supported fonts

ALTO Font supports TrueType outlines in TTF/OpenType, WOFF, and WOFF2 files, and individual faces from TTC/OTC collections. CFF/CFF2 outlines, color glyphs, and WOFF2 collections are unsupported. See Formats for operation-specific limits.

Variable fonts can retain their axes during conversion and subsetting. Exporting a fixed weight from a variable font is not supported. ALTO Font reads and transforms font data; text shaping and rendering are handled by the application or browser using the output.

Contributing

Contributions of all kinds are welcome. Visit the project on GitHub to report a bug, suggest a feature, or open a pull request.

Before submitting code, run:

Changes to public behavior should include tests and documentation.

Support

ALTO Font is open source and independently maintained by Simon André. If it is useful to your work, you can support its continued development through GitHub Sponsors.

Sharing the package or starring it on GitHub also helps.

License

ALTO Font is released by ALTO PHP under the MIT License.


All versions of font with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-zlib Version *
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 alto/font contains the following files

Loading the files please wait ...