Dashboard sipadu mbip
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
root d8c1b4a1be initial 5 роки тому
..
maps initial 5 роки тому
sample-fonts initial 5 роки тому
src/FontLib initial 5 роки тому
tests/FontLib initial 5 роки тому
.gitattributes initial 5 роки тому
.gitignore initial 5 роки тому
.htaccess initial 5 роки тому
.travis.yml initial 5 роки тому
LICENSE initial 5 роки тому
README.md initial 5 роки тому
bower.json initial 5 роки тому
composer.json initial 5 роки тому
index.php initial 5 роки тому
phpunit.xml.dist initial 5 роки тому

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>';