I know that question is is asked not the first time but all the other threads havn't helped me to get it work. I trie to get my own font work in my mPDF call. In read that version 7 I can load my own font without changing the config_fonts.php. Here is my try:
$mpdf = new \mPDF('utf-8','A4','');
$mpdf->fontDir = './assets/fonts/';
$mpdf->fontdata = array(
"qanela" => array(
'R' => "QanelasSoft-Regular.ttf",
'B' => "QanelasSoft-Bold.ttf",
),
);
$mpdf->SetFont('qanela');
with this code I get the errormessage
mPDF Error - Font is not supported - dejavusanscondensed.
it is called from
mpdf/vendor/mpdf/mpdf/mpdf.php
on Line 3809 with
if (!isset($this->fontdata[$family][$stylekey]) || !$this->fontdata[$family][$stylekey]) { throw new MpdfException('mPDF Error - Font is not supported - ' . $family . ' ' . $style); }
Hopefull someone can help me.
Cheers