I'm using mPdf version 6 and want to add new custom font in it but it's not using new font family. What I did is:
- mpdf\ttfonts folder
in config_fonts.php file added following code in fontdata:
"helvetica" => array( 'R' => "helvetica-neue-condensed-black-59233f88d5395.ttf", ),
where "helvetica-neue-condensed-black-59233f88d5395.ttf" is the name of the file.
Following is my mPdf code for creating pdf:
$mpdf = new \Mpdf(['mode' => 'c']);
$mpdf->SetFont('helvetica');
$mpdf->SetTitle('PDF title');
$mpdf->AddPage('P','','','','',8,8,5,5,10,10);
$mpdf->WriteHTML($this->html);
$mpdf->Output('test.pdf', 'd');
I checked whatever I write in SetFont nothing in Pdf changed..