I am trying to create a pdf in the Tamil language, but I am experiencing font rendering issues. When I use the Baamini font, it works, but there is no English font in Baamini, so I tried other fonts such as latha.ttf, notosans.ttf, azaghi.ttf, and others, but these fonts do not work in tcpdf or fpdf. Please assist us in resolving this, and thank you in advance!
<?php
header('Content-type: text/html; charset=UTF-8') ;//chrome
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->setFontSubsetting(true);
$pdf->SetFont('freeserif', '', 12);
$pdf->AddPage();
$utf8text = '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <p>தினமும் உங்களை இந்த தோட்டத்து வழியாக செல்லும்போது என்னை கவனிப்பீர்களா என்று திரும்பி திரும்பி பார்த்து செல்வேன். ஆனால் நீங்களோ வெறி பிடித்தது போல் மண்ணை கொத்தி கொண்டிருப்பீர்கள்.</p></body></html>';
$pdf->writeHTML($utf8text, true, 0, true, true);
$pdf->Output('example_067.pdf', 'I');
?>
My Output is