Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via composer

phenx/php-font-lib 0.5.5

A library to read, parse, export and make subsets of different types of font files.
Package summary
Share
1
issue
1
moderate severity
license
1
1
license
1
LGPL-2.1-or-later
Package created
14 Nov 2012
Version published
7 Jan 2024
Maintainers
1
Total deps
1
Direct deps
0
License
LGPL-2.1-or-later

Issues

1

1 moderate severity issue

moderate
Recommendation: Validate that the package complies with your license policy
via: phenx/php-font-lib@0.5.5
Collapse
Expand

Licenses

GNU Lesser General Public License v2.1 or later

Weakly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
phenx/php-font-lib@0.5.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of phenx/php-font-lib 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does phenx/php-font-lib do?

The phenx/php-font-lib is a unique PHP library designed to read, parse, export, and make subsets of different types of font files. It supports numerous font types, including TrueType, OpenType (with TrueType glyphs), and WOFF font files. The library also provides functionality for extracting basic and advanced information from the font files. You can garner details about the font's name, style, horizontal metrics, glyph names, glyph shapes, and much more. Additionally, the tool allows users to create an Adobe Font Metrics (AFM) file from a particular font. This project was born out of the need to read font files in the DOMPDF project.

How do you use phenx/php-font-lib?

To utilize the phenx/php-font-lib in your code, you first need to load the desired font file using the \FontLib\Font::load() function, followed by the parse() method. After you've loaded and parsed the font file, you can extract a plethora of font details using available methods.

Here is a simple example that shows how to use this package:

$font = \FontLib\Font::load('../../fontfile.ttf');
$font->parse();
echo $font->getFontName() .'<br>'; 
echo $font->getFontSubfamily() .'<br>'; 
echo $font->getFontSubfamilyID() .'<br>'; 
echo $font->getFontFullName() .'<br>'; 
echo $font->getFontVersion() .'<br>'; 
echo $font->getFontWeight() .'<br>'; 
echo $font->getFontPostscriptName() .'<br>'; 

Make sure to replace '../../fontfile.ttf' with the actual path of your font file.

Where are the phenx/php-font-lib docs?

The documentation for phenx/php-font-lib can be found on their GitHub repository under the README file. Comprehensive details on how the library works, the specifications it follows, and examples of how to use it can be found here. However, to interactively explore the library and directly visualize its capabilities, users can visit: php-font-lib demo GUI.