utils icon indicating copy to clipboard operation
utils copied to clipboard

errors in load_font.php

Open schel4ok opened this issue 8 years ago • 3 comments

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

schel4ok avatar Feb 11 '17 20:02 schel4ok

It looks like we need to update the script to appropriately handle Composer installations.

bsweeney avatar Feb 15 '17 18:02 bsweeney

@bsweeney Still this issue exists. I am using 0.8.1 version. May I know by which version this will fixed. Thankyou.

HimakarPV avatar Sep 16 '17 15:09 HimakarPV

I'll be addressing any outstanding issues in the utils project once I finalize the 0.8.1 release.

bsweeney avatar Sep 16 '17 23:09 bsweeney