PHP: How to read “Title” of font from .ttf file?

后端 未结 3 925
青春惊慌失措
青春惊慌失措 2020-12-25 13:58

I really need to be able to extract the metadata from a .ttf true type font file.

I\'m building a central database of all the fonts all our designers use (they\'re f

3条回答
  •  心在旅途
    2020-12-25 14:05

    Why reinvent the wheel when the fine people at DOMPDF project has already done the work for you? Take a look at php-font-lib @ https://github.com/PhenX/php-font-lib. This has all the features that you have asked for and supports other font formats as well. Look at the demo UI @ http://pxd.me/php-font-lib/www/font_explorer.html to get an idea about what kind of information you can get from this library.

提交回复
热议问题