{"action":"created","issue":{"url":"https://api.github.com/repos/dompdf/dompdf/issues/1054","labels_url":"https://api.github.com/repos/dompdf/dompdf/issues/1054/labels{/name}","comments_url":"https://api.github.com/repos/dompdf/dompdf/issues/1054/comments","events_url":"https://api.github.com/repos/dompdf/dompdf/issues/1054/events","html_url":"https://github.com/dompdf/dompdf/issues/1054","id":116082491,"number":1054,"title":"Class 'Font_Metrics' not found","user":{"login":"nostalgicdodo","id":8440761,"avatar_url":"https://avatars.githubusercontent.com/u/8440761?v=3","gravatar_id":"","url":"https://api.github.com/users/nostalgicdodo","html_url":"https://github.com/nostalgicdodo","followers_url":"https://api.github.com/users/nostalgicdodo/followers","following_url":"https://api.github.com/users/nostalgicdodo/following{/other_user}","gists_url":"https://api.github.com/users/nostalgicdodo/gists{/gist_id}","starred_url":"https://api.github.com/users/nostalgicdodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nostalgicdodo/subscriptions","organizations_url":"https://api.github.com/users/nostalgicdodo/orgs","repos_url":"https://api.github.com/users/nostalgicdodo/repos","events_url":"https://api.github.com/users/nostalgicdodo/events{/privacy}","received_events_url":"https://api.github.com/users/nostalgicdodo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dompdf/dompdf/labels/documentation","name":"documentation","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dompdf/dompdf/milestones/3","html_url":"https://github.com/dompdf/dompdf/milestones/0.7.0","labels_url":"https://api.github.com/repos/dompdf/dompdf/milestones/3/labels","id":592841,"number":3,"title":"0.7.0","description":"","creator":{"login":"gabrielbull","id":671923,"avatar_url":"https://avatars.githubusercontent.com/u/671923?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielbull","html_url":"https://github.com/gabrielbull","followers_url":"https://api.github.com/users/gabrielbull/followers","following_url":"https://api.github.com/users/gabrielbull/following{/other_user}","gists_url":"https://api.github.com/users/gabrielbull/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielbull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielbull/subscriptions","organizations_url":"https://api.github.com/users/gabrielbull/orgs","repos_url":"https://api.github.com/users/gabrielbull/repos","events_url":"https://api.github.com/users/gabrielbull/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielbull/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":4,"state":"open","created_at":"2014-03-10T16:29:16Z","updated_at":"2015-11-19T08:28:48Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-11-10T10:50:02Z","updated_at":"2015-11-19T08:28:48Z","closed_at":"2015-11-19T08:28:48Z","body":"I am trying to enable inline PHP but I get the following error,\r\n\r\n`Fatal error: Class 'Font_Metrics' not found in peadeff/vendor/dompdf/dompdf/src/PhpEvaluator.php(48) : eval()'d code on line 5`\r\n\r\nhere is the code that I've used.\r\n\r\n```php\r\n\r\nrequire __DIR__ . '/vendor/autoload.php';\r\n\r\nuse Dompdf\\Dompdf;\r\n\r\nob_start();\r\nrequire \"template.php\";\r\n$html = ob_get_clean();\r\n\r\n$dompdf = new DOMPDF();\r\n$dompdf->set_option( \"is_php_enabled\" , true ); // the faulty statement; otherwise pdf generation works\r\n\r\n$dompdf->load_html( $html );\r\n$dompdf->setPaper( \"A4\" , \"potrait\" );\r\n$dompdf->render();\r\n\r\nfile_put_contents( \"output.pdf\" , $dompdf->output() );\r\n\r\n```\r\n\r\nhow can I fix this?\r\n\r\nEDIT:\r\nactually this is the faulty line\r\n`$font = Font_Metrics::get_font( \"verdana\" , \"bold\" );`\r\nwithin the `text/php` block"},"comment":{"url":"https://api.github.com/repos/dompdf/dompdf/issues/comments/157987951","html_url":"https://github.com/dompdf/dompdf/issues/1054#issuecomment-157987951","issue_url":"https://api.github.com/repos/dompdf/dompdf/issues/1054","id":157987951,"user":{"login":"nostalgicdodo","id":8440761,"avatar_url":"https://avatars.githubusercontent.com/u/8440761?v=3","gravatar_id":"","url":"https://api.github.com/users/nostalgicdodo","html_url":"https://github.com/nostalgicdodo","followers_url":"https://api.github.com/users/nostalgicdodo/followers","following_url":"https://api.github.com/users/nostalgicdodo/following{/other_user}","gists_url":"https://api.github.com/users/nostalgicdodo/gists{/gist_id}","starred_url":"https://api.github.com/users/nostalgicdodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nostalgicdodo/subscriptions","organizations_url":"https://api.github.com/users/nostalgicdodo/orgs","repos_url":"https://api.github.com/users/nostalgicdodo/repos","events_url":"https://api.github.com/users/nostalgicdodo/events{/privacy}","received_events_url":"https://api.github.com/users/nostalgicdodo/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T08:28:48Z","updated_at":"2015-11-19T08:28:48Z","body":"thanks."}}