Skip to content

Commit 34c5dc9

Browse files
danielscscbsweeney
authored andcommitted
Fix path to maps in AdobeFontMetrics.php
`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__) . '/../'`
1 parent 671df0f commit 34c5dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FontLib/AdobeFontMetrics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function write($file, $encoding = null) {
3333

3434
if ($encoding) {
3535
$encoding = preg_replace("/[^a-z0-9-_]/", "", $encoding);
36-
$map_file = dirname(__FILE__) . "/../maps/$encoding.map";
36+
$map_file = dirname(__FILE__) . "/../../maps/$encoding.map";
3737
if (!file_exists($map_file)) {
3838
throw new \Exception("Unknown encoding ($encoding)");
3939
}

0 commit comments

Comments
 (0)