I have been trying to set tamil font to display in PDF by using dompdf in codeigniter. As followed this instruction Dompdf and set different font-family I have set the font family but this is not working for tamil fonts. I have updated Baamini.ttf inside the lip folder and I have set the font family as like below,
@font-face {
font-family: "Baamini";
src: url(\'fonts/Baamini.ttf\') format("truetype");
font-weight: normal;
font-style: normal;
}
body{
font-family: "Baamini";
}
In my controller file
$this->load->helper(array('dompdf', 'file'));
$dompdf = new DOMPDF();
$html = $this->load->view('ret_purchase/vendor_ack', $data,true);
$dompdf->load_html($html);
$dompdf->set_paper('A4', "portriat" );
$dompdf->render();
$file = $dompdf->output();
$dompdf->stream("VendorAck.pdf",array('Attachment'=>0));
but when I create pdf it's showing like square brackets instead of tamil fonts.