welcome to the fifth chapter of PHP FPDF tutorial series.
in this short chapter, i'm about to demonstrate how to add custom font in our PDF document.
and we will also learn how to deal with font variants.
as an examples, we will use three different font families. Jokerman, Freescript, and Alien League second edition.
Alien League, however, will have two variants which is regular version, and italic version.
so here we have 2 font files for Alien League, one is regular the other is italic.
in FPDF, we cannot use the font's TTF file directly to add a new font.
so in FPDF directory, there is a script called makefont.php.
we use makefont to convert ttf file into .z file and .php file which stores characters definition.
Source Code : https://bit.ly/3hYdT0F
More tutorial on this series : https://goo.gl/TNqTN4 (PHP PDF Tutorial Series)
P.S: again, i made a mistake about the chapter number. :)