3 A Drupal 8 module providing a file metadata plugin to retrieve information from
9 Uses the [PHP Font Lib](https://github.com/PhenX/php-font-lib) to read font
10 information from TTF/OTF/WOFF font files.
15 1. Use the _file_metadata_manager_ service to prepare collecting metadata for
16 the font located at a desired URI:
19 $fmdm = \Drupal::service('file_metadata_manager');
20 $my_font_metadata = $fmdm->uri('public::/my_font_directory/arial.ttf');
24 2. Get the value of a key:
28 $font_name = $my_font_metadata->getMetadata('font', 'FontName');
32 3. Get an array with all the metadata values:
37 foreach ($my_font_metadata->getSupportedKeys('font') as $key) {
38 $my_font_info[$key] = $my_font_metadata->getMetadata('font', $key);
44 ## Available metadata keys: