SetFont(string family [, string style [, float size]])
FPDF_FONTPATH
constant (if that constant is defined)font
directory located in the same directory as fpdf.php
(if it exists)FPDF_FONTPATH
:
define('FPDF_FONTPATH', '/home/www/font');
require('fpdf.php');
family
Courier
(fixed-width)Helvetica
or Arial
(synonymous; sans serif)Times
(serif)Symbol
(symbolic)ZapfDingbats
(symbolic)style
B
: boldI
: italicU
: underlineSymbol
and ZapfDingbats
.
size
// Times regular 12
$pdf->SetFont('Times');
// Arial bold 14
$pdf->SetFont('Arial', 'B', 14);
// Removes bold
$pdf->SetFont('');
// Times bold, italic and underlined 14
$pdf->SetFont('Times', 'BIU');