Hi All,
I found it impossible to use FontAwesome 4.7.0 Free version, inside FPDF PHP engine.
When trying to upload the FontAwesome.4.7.full.otf into FPDF's Font File Generation, I'm getting an error:
Error: OpenType fonts based on PostScript outlines are not supported
So my solution,
to re-build the FontAwesome font 4.7 free version (under same license!),
with mapping of regular characters to icons HEX CODES: 0x21 to 0xFF.
So for example,
character code 0x21 is now mapped to * (FontAwesome's asterisk)
And then, just use it inside PHP FPDF as follows:
// Import and prepare font for usage by engine:
$pdf->AddFont('FontAwesome47-P1','','FontAwesome47-P1.php');
...
// print FontAwesome's asterisk
$pdf->SetFont('FontAwesome47-P1' '', 14);
$pdf->Text($x, $y, chr(0x21));
Note:
Remember to upload the files FontAwesome47-P1.php + FontAwesome47-P1.z,
that generated on FPDF's Font File Generation to the FPDF's font folder.
Characters code MAP of new fonts exists as preview when opening the google-drive links below.
View MAP + DOWNLOAD: FontAwesome47-P1.otf (google drive)
View MAP + DOWNLOAD: FontAwesome47-P2.otf (google drive)
View MAP + DOWNLOAD: FontAwesome47-P3.otf (google drive)
View MAP + DOWNLOAD: FontAwesome47-P4.otf (google drive)
PHP+Z Files ready-to-use for PHP FPDF (with ISO-8859-1 encoding):
FontAwesome47-P1-4 (php+z files) DOWNLOAD (google drive)
Best regards!
Please write comments...