dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 256 forks source link

Exception on PHP 7.4: Trying to access array offset on value of type null #75

Closed dtvmedia closed 4 years ago

dtvmedia commented 4 years ago

Hi, I just tried a project of mine on PHP 7.4 and I experienced the following exception there related to this lib when rendering a pdf with dompdf:

ErrorException: Trying to access array offset on value of type null in AdobeFontMetrics.php line 142

bsweeney commented 4 years ago

Will try to get a release out soon-ish to address PHP compatibility issues.

dvdmarchetti commented 4 years ago

This fix also solved me the PDF generation when I render an HTML template that uses a Google Fonts stylesheet without the needs to download any ttf font on the server.

dtvmedia commented 4 years ago

Any plans when this will be released? Thats the only package holding me back from upgrading to PHP 7.4.

marijnbent commented 4 years ago

@bsweeney Why not releasing this in the meantime? This fix would solve the error most people have.

cicoasm commented 4 years ago

It doesn't work with php 7.4, from many problems.

bsweeney commented 4 years ago

Just want to note that PhenX released 0.5.2 April 12.