我正在使用 DOMPDF 库来生成 pdf 文件。问题是渲染土耳其字符。
它不会渲染所有土耳其语字符。例如,对于单词“Oranı”,它会显示“Oranı”。
知道如何解决这个问题吗?
我尝试了所有内置字体系列,如“dejavu”、“helvetica”、“arial”。
配置:
在 DOMPDF 配置文件 (dompdf_config.inc.php)
def("DOMPDF_UNICODE_ENABLED", true);
mb_internal_encoding('UTF-8');
在我的html中,
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
body { font-family: "arial"; }
</style>
</head>
<body>
<--- my content --->
</body>
</html>