I created a website that dynamically creates PDF using tcpdf and embeds fonts in PDF. The user can choose from a number of standard fonts, such as Arial, Verdana, etc. The system then selects the ttf font directly from my server and embeds it using the code below. Text with this font can be seen in most cases for viewing in pdf format, but the iPad/iPhone's viewer did not display it. I downloaded the new (random) version of Arial.ttf as a test (not sure about the difference in the file, but now it looks fine.
I need to do this for several fonts, but I shoot in the dark because I donβt know what in a font can cause it to not embed. Does anyone know that in ttf fonts will not be displayed? Shows great results for other viewers and shows that will be embedded in the Acrobat document properties?
thanks
$fontname = $pdf->addTTFfont('/tcpdf/fonts/custom/'.$ttfFile.'.ttf', 'TrueTypeUnicode', '', 32);
// use font
$pdf->SetFont($fontname, '', $fontPoints, '', 'false');
user1916116
source share