Skip to content

errors in load_font.php #1

@schel4ok

Description

@schel4ok

I try to add cyrillic font to DOMPDF 0.7 but always errors.

First of all I had this when run load_font.php in command line

Fatal error: Uncaught exception 'Dompdf\Exception' with message 'Unable to read '/vendor/dompdf/dompdf/arialuni.ttf'.' in D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\load_font.php:85
Stack trace:
#0 [internal function]: install_font_family(Object(Dompdf\Dompdf), 'Arialuni', '/vendor/dompdf/...')
#1 D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\load_font.php(200): call_user_func_array('install_font_fa...', Array)
#2 {main}
  thrown in D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\load_font.php on line 85

Then I go to autoload.inc.php and found that there is

require_once __DIR__ . '/lib/php-font-lib/src/FontLib/Autoloader.php';
require_once __DIR__ . '/lib/php-svg-lib/src/autoload.php';

But checking manually I didn't find these folders under lib

ё@OFFICE d:\OpenServer\domains\site.new\vendor\dompdf\dompdf\lib
> ls -a
.  ..  Cpdf.php  fonts  html5lib  res

Then I commented these lines, but one more error

> php load_font.php Arialuni arialuni.ttf
Unable to find bold face file.
Unable to find italic face file.
Unable to find bold_italic face file.
Copying arialuni.ttf to D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\lib\fonts/arialuni.ttf...
Generating Adobe Font Metrics for D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\lib\fonts/arialuni...

Fatal error: Class 'FontLib\Font' not found in D:\OpenServer\domains\site.new\vendor\dompdf\dompdf\load_font.php on line 153

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions