Dashboard sipadu mbip
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
root d8c1b4a1be initial il y a 5 ans
..
maps initial il y a 5 ans
sample-fonts initial il y a 5 ans
src/FontLib initial il y a 5 ans
tests/FontLib initial il y a 5 ans
.gitattributes initial il y a 5 ans
.gitignore initial il y a 5 ans
.htaccess initial il y a 5 ans
.travis.yml initial il y a 5 ans
LICENSE initial il y a 5 ans
README.md initial il y a 5 ans
bower.json initial il y a 5 ans
composer.json initial il y a 5 ans
index.php initial il y a 5 ans
phpunit.xml.dist initial il y a 5 ans

README.md

PHP Font Lib

Build Status

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.

This project was initiated by the need to read font files in the DOMPDF project.

Usage Example

$font = \FontLib\Font::load('../../fontfile.ttf');
$font->parse();  // for getFontWeight() to work this call must be done first!
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>';