如何在 FOP Apache 生成的 PDF 中显示表情符号

问题描述

我正在寻找一种方法,可以在 FOP Apache 生成的 PDF 中显示尽可能多的字符(包括表情符号)。 FOP 人员建议使用包含表情符号的字体,但我尝试了来自 Google 的 NotoColorEmoji.ttf 并得到了一个例外。我也尝试过 Symbola 等,但所有字体似乎都很旧,并且由 ZWJ(零宽度连接器)分隔的表情符号不起作用。我还尝试了 Curier New,因为它在 Windows 10 中正确显示了表情符号,但 ttf 不包含表情符号。我需要显示的字符如下:

阿奥乌

个相同基因的更多⻉来提奇迹

Πρωτότυπο κβαντικό ραντάρ από ερευνητές στην Αυστρία

☹️????????☺️??????????

?‍⚕️

使用 NotoColorEmoji.ttf 时的异常如下:

2021-01-27 15:19:18,104 ERROR Failed to read font file file:///C:/Roboto/Noto/NotoColorEmoji.ttf 'loca' table not found,happens when the font file doesn't contain TrueType outlines (trying to read an OpenType CFF font maybe?): java.io.IOException: 'loca' table not found,happens when the font file doesn't contain TrueType outlines (trying to read an OpenType CFF font maybe?)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)