PHP code example of laurentmuller / fpdf2-make-font
1. Go to this page and download the library: Download laurentmuller/fpdf2-make-font library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use fpdf\Enums\PdfFontStyle;
use fpdf\PdfDocument;
$pdf = new PdfDocument();
$pdf->addFont('CevicheOne', PdfFontStyle::REGULAR, 'CevicheOne-Regular.php');
$pdf->addPage();
$pdf->setFont('CevicheOne', PdfFontStyle::REGULAR, 45);
$pdf->write(10, 'Enjoy new fonts with FPDF!');
$pdf->output();