diff --git a/load_font.php b/load_font.php index 866cc06..5a7a797 100755 --- a/load_font.php +++ b/load_font.php @@ -57,10 +57,11 @@ function usage() { usage(); } -$dompdf = new Dompdf(); +$options = new Options(); if (isset($fontDir) && realpath($fontDir) !== false) { - $dompdf->getOptions()->set('fontDir', $fontDir); + $options->set('fontDir', $fontDir); } +$dompdf = new Dompdf($options); /** * Installs a new font family