重新上传 ttf 后出现 tPDF 错误 "Undefined font: dejavu"
tPDF error after reuploading ttf "Undefined font: dejavu"
我正在使用 tFPDF 包
$pdf=new tFPDF();
$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('DejaVu', '', 12);
它曾经有效。我不得不重新上传字体文件夹,然后我收到错误消息
FPDF error: Undefined font: dejavu
但是文件 DejaVuSansCondensed.ttf
肯定在 fonts 文件夹中。我什至将 mod 更改为 777
因为我认为可能是访问权限的问题,但它仍然无法正常工作。还有什么可能导致此错误?
好的,我刚刚找到解决方案,对不起 post。
Delete all *.php and *.dat files in font/unifont folder except
ttfonts.php. All this files will be re-created (with right path).
我正在使用 tFPDF 包
$pdf=new tFPDF();
$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true);
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('DejaVu', '', 12);
它曾经有效。我不得不重新上传字体文件夹,然后我收到错误消息
FPDF error: Undefined font: dejavu
但是文件 DejaVuSansCondensed.ttf
肯定在 fonts 文件夹中。我什至将 mod 更改为 777
因为我认为可能是访问权限的问题,但它仍然无法正常工作。还有什么可能导致此错误?
好的,我刚刚找到解决方案,对不起 post。
Delete all *.php and *.dat files in font/unifont folder except ttfonts.php. All this files will be re-created (with right path).