Closed jausions closed 1 year ago
Same issue for _example054.php which is also a form example.
And for some reason, _example052.php (encryption) also requires helvetica
for the same line number 9921 of tcpdf.php
For info, I am trying to build a set of rendered examples that could be used as a reference for non-regression tests when corrections are applied to the code base.
However, to be cross-environment independent and have the same rendering, the fonts used should be non-commercial ones and be available on most operating systems. Sadly, Helvetica is a commercial font, so GNU's FreeFont and DéjàVu are viable alternative in my view. When I tried to switched font for the aforementioned examples, the notice popped up on PHP 7.4+.
If we create some code based on _example014.php and remplace the font used by something else than
helvetica
(at lines 74, 88, 92), then a notice is raised from PHP 7.4+.We can see the problem is with a hard-coded
helvetica
font name at line 9921 of tcpdf.phpIt is probably safer to not modify the tcpdf.php file and just inform the user in the _example014.php file that
helvetica
must be used at line 74. I will do a PR.