MakeFont(string fontfile [, string enc [, boolean embed [, boolean subset]]])
fontfilePath to the .ttf, .otf or .pfb file.
encName of the encoding to use. Default value: cp1252.
embedWhether to embed the font or not. Default value: true.
subsetWhether to subset the font or not. Default value: true.
file entry in the JSON file accordingly.
<?php
require('makefont/makefont.php');
MakeFont('C:\\Windows\\Fonts\\comic.ttf', 'cp1252');
?>
$pdf->AddFont('Comic', '', 'comic.json');
$pdf->AddFont('Comic', 'B', 'comicbd.json');
<?php
require('makefont/makefont.php');
MakeFont('CevicheOne-Regular.ttf', 'cp1252');
?>
<?php
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddFont('CevicheOne', '', 'CevicheOne-Regular.json');
$pdf->AddPage();
$pdf->SetFont('CevicheOne', '', 45);
$pdf->Write(10, 'Enjoy new fonts with FPDF!');
$pdf->Output();
?>