Topic: Use custom fonts

Hello,

I want to ask how to add new font to the report?

I want to display arabic character and I have downloaded necessary file from TCPDF github: aealarabiya.php, aealarabiya.ctg.z, and aealarabiya.z. I put it in the reporting/fonts folder.

I add:

$rep->AddFont('aealarabiya');
$rep->SetFont('aealarabiya');

Still the output PDF doesn't output any character. Just broken symbol.

Re: Use custom fonts

See this post and this wiki page.

Re: Use custom fonts

Still doesn't work. I think it is loaded but it displays some weird characters. I also have installed the font in my PC but still doesn't work.

Re: Use custom fonts

Refer this page in the wiki for Arabic Fonts in FA and this post. The line number is 157 in FA 2.4 in reporting/includes/class.pdf.inc needs to be edited to reference your font.