I am generating the PDF using TCPDF. The output I get is in Helvetica font but I want it in Frutiger. I have a frutiger.otf
file.
I tried the following code
$fontname = $pdf->addTTFfont('Frutiger-45Light.otf', 'TrueTypeUnicode', '', 32);
$pdf->SetFont($fontname);
I am getting an error: could not include font definition file
. And I have googled many websites which didn't help.
You cannot use a URL as fontfile
. It must be a path in the local filesystem.
If you need a font on a different server you first must download it yourself. Since fonts are static you should do this manually.