Jump to content

How to add a new font in fpdf ?


Recommended Posts

First, sorry for my bad english.
My site languages are french and chinese and i have a problem when editing invoices in chinese : all characters are replaced with ??? so i found a solution : adding the simsun font to fpdf.
After downloading the simsun.ttf, I generated the files simsun.php and simsun.z with makefont.php and then I tried to add

$this->AddFont('SimSun', '', 'font/simsun.php');

to classes/PDF.php under the _initPDFFonts() function, but after selecting simsun in the BO i got this error :
FPDF error: Could not include font definition file

If anyone has an idea, thanks to him.

Link to comment
Share on other sites

  • 11 months later...

First, sorry for my bad english.

My site languages are french and chinese and i have a problem when editing invoices in chinese : all characters are replaced with ??? so i found a solution : adding the simsun font to fpdf.

After downloading the simsun.ttf, I generated the files simsun.php and simsun.z with makefont.php and then I tried to add

 

$this->AddFont('SimSun', '', 'font/simsun.php');

 

to classes/PDF.php under the _initPDFFonts() function, but after selecting simsun in the BO i got this error :

FPDF error: Could not include font definition file

 

If anyone has an idea, thanks to him.

 

IF YOU HAVE QQ,I HAVE THE SAME QUESTION.

Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...