在 Linux 上尝试重新生成
ReadyAPI 报告时,您可能会遇到如下错误:
net.sf.jasperreports.engine.util.JRFontNotFoundException: JVM 无法使用字体“Arial”。
这是因为并非所有 Linux 安装都包含 ReadyAPI 报告中使用的 Microsoft 核心字体。因此,要解决此问题,您需要下载 mscorefonts 包。
1. 要在 Ubuntu 中安装此软件包,请尝试在终端中运行以下命令:
wget http://httpredir.debian.org/debian/pool/contrib/m/msttcorefonts/ ttf - mscorefonts -installer_3.6_all.deb
sudo dpkg -我 ttf-mscorefonts-installer_3.6_all.deb
注意:如果您使用其他 Linux 发行版,请参阅其文档以了解如何安装该软件包。
2、安装完成后,可以在/usr/share/fonts/truetype/msttcorefonts中看到字体。将所有 ttf 文件复制到 {ReadyAPI install}/jre/lib/fonts 目录。
3. 重新启动 ReadyAPI - 现在,所需的字体应该可用了。