Skip to content

Fix path to maps in AdobeFontMetrics.php #136

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Conversation

danielscsc
Copy link
Contributor

@danielscsc danielscsc commented Jan 10, 2024

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__) . '/../'

`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__) . '/../'`
@bsweeney bsweeney added this to the 0.5.6 milestone Jan 10, 2024
@bsweeney bsweeney merged commit 34c5dc9 into dompdf:master Jan 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants