【发布时间】:2014-01-13 21:42:14
【问题描述】:
-
我正在尝试使用 FPDF 创建马拉雅拉姆语 pdf。
使用 meera.ttf
的字体它正在工作,但不能正常工作。
结果是这样的ഇഗലീഷ്
我想要结果ഇംഗ്ലീഷ്
代码***
$pdf = new tFPDF(); $pdf->AddPage(); // Add a Unicode font (uses UTF-8) $pdf->AddFont('meera','','meera.ttf',true); $pdf->SetFont('meera','',14); // Load a UTF-8 string from a file and print it $txt = file_get_contents('HelloWorld.txt'); $pdf->Write(8,$txt); // Select a standard font (uses windows-1252) $pdf->SetFont('meera','',14); $pdf->Ln(10); $pdf->Write(5,'The file size of this PDF is only 12 KB.'); $pdf->Output(); ?>HelloWorld.txt
ഇംഗ്ലീഷ്
【问题讨论】:
-
这与
FPDF无关,需要使用其他不同的马拉雅拉姆字体。 -
同意;我经常看到泰卢固语的这个问题。有些字体可以很好地识别字符的上下文,而有些则不行。
-
试试 mpdf。支持所有语言
标签: php pdf unicode fpdf truetype