mpdf不支持阿拉伯和中文字体 [英] mpdf not supporting arabic and chinese fonts

查看:192
本文介绍了mpdf不支持阿拉伯和中文字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用mpdf.当我向WriteHtml()提供阿拉伯语和中文单词时,生成的pdf包含方框而不是那些字体.

I am using mpdf. When I supplied the arabic and chinese words to the WriteHtml(), the resulting pdf containing square boxes instead of those fonts.

请提出建议!

示例字体:

I am testing أنا العالم 我的世界

推荐答案

在mPDF 6.0上,我们发现这使粤语对我们有用:

On mPDF 6.0, we found this made Cantonese work for us:

$mpdf->autoScriptToLang = true;
$mpdf->autoLangToFont = true;

似乎不建议使用SetAutoFont.

Seems SetAutoFont is now deprecated.

这篇关于mpdf不支持阿拉伯和中文字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆