tcpdf not show custom font correctly -


according how implement custom fonts in tcpdf import custom font tcpdf, when use see result enter image description here.

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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -