dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 256 forks source link

Fix path to maps in AdobeFontMetrics.php #136

Closed danielscsc closed 5 months ago

danielscsc commented 6 months ago

Currently get Fatal error: Uncaught Exception: Unknown encoding whenever passing an encoding to saveAdobeFontMetrics. This is because we aren't correctly pointing to the maps/ directory.

dirname(__FILE__) gives you php-font-lib/src/Fontlib dirname(__FILE__) . '/../' gives you php-font-lib/src/

We need one more level up, to hit /maps.

P.S. We can also use __DIR__ . '/../../' OR dirname(__DIR__) . '/../'