I use the FPDF library for PHP to create reports, but now I need to use a different font (Verdana), which is not in the main fonts. I added the line:
$pdf->AddFont('Verdana','','verdana.php');
I copied the verdana.php and verdana.z files to the font directory. Everything works fine if I use the following instructions:
$pdf->SetFont('Verdana','',6);
But if I try to use the following command (to use bold):
$pdf->SetFont('Verdana','B',6);
I get an error message:
FPDF error: Undefined font: verdana B
I tried adding another font for Verdana Bold:
$pdf->AddFont('Verdana-Bold','B','verdanab.php');
Of course, I put the verdanab.php and verdanab.z files in the font directory. But I get the same error. What am I missing or how to use Verdana fonts (normal and bold)?
Thanks in advance.
php fonts fpdf
Marco muciño
source share