define('FPDF_FONTPATH','/home/www/font/'); require('fpdf.php'); |
Family font. It can be either a name defined by AddFont() or one of the standard families (case insensitive):styleIt is also possible to pass an empty string. In that case, the current family is retained.
- Courier (fixed-width)
- Helvetica or Arial (synonymous; sans serif)
- Times (serif)
- Symbol (symbolic)
- ZapfDingbats (symbolic)
Font style. Possible values are (case insensitive):sizeor any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats.
- empty string: regular
- B: bold
- I: italic
- U: underline
Font size in points.
The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12.
//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'); |