tcpdf not show custom font correctly -
according how implement custom fonts in tcpdf import custom font tcpdf, when use see result .
this part of code
$pdf = new mypdf(pdf_page_orientation, pdf_unit, pdf_page_format, true, 'utf-8', false); // set language dependent data: $lg = array(); $lg['a_meta_charset'] = 'utf-8'; //$lg['a_meta_dir'] = 'rtl'; $lg['a_meta_language'] = 'fa'; $lg['w_page'] = 'page'; // set language-dependent strings (optional) $pdf->setlanguagearray($lg); // set image scale factor $pdf->setimagescale(pdf_image_scale_ratio); // --------------------------------------------------------- // add page $pdf->addpage(); // convert ttf font tcpdf format , store on fonts folder $fontname = tcpdf_fonts::addttffont(k_path_fonts.'byekan.ttf', 'truetypeunicode', '', 14); //ym($fontname); //die(); //$this->pdf->setfont('byekan'); $pdf->setfont($fontname, '', 8, '', true);
my text language persian , try fonts result thing this, character not show correctly.also try http://fonts.snm-portal.com/ results same .
Comments
Post a Comment