使用Jasper Reports的JVM无法使用Font [英] Font is not available to the JVM with Jasper Reports

查看:747
本文介绍了使用Jasper Reports的JVM无法使用Font的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用DynamicJasper生成报告,但是我收到以下错误:

I'm trying to generate report with DynamicJasper, but I'm getting the following error:

net.sf.jasperreports.engine.util.JRFontNotFoundException:  
                                 Font 'Arial' is not available to the JVM.   

msttcorefonts ,但我猜JVM没有使用它的任何字体。

msttcorefonts is installed, but I guess the JVM is not using any fonts from it.

我正在使用Ubuntu 10.04。

I'm using Ubuntu 10.04.

我该如何解决这个问题?

How can I fix this?

推荐答案

我尝试安装mscorefonts ,但是软件包已经安装并且是最新的。

I tried installing mscorefonts, but the package was installed and up-to-date.

sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer

我尝试在文件系统中搜索字体,其中包含:

I tried searching for the font in the filesystem, with:

ls /usr/share/fonts/truetype/msttcorefonts/

此文件夹只有自述文件,其中包含有关如何安装的正确说明。

This folder just had the README, with the correct instructions on how to install.

cat /usr/share/fonts/truetype/msttcorefonts/README

您需要互联网连接:

sudo apt-get install --reinstall ttf-mscorefonts-installer

我重新安装 ttf-mscorefonts-installer (如上图所示,确保接受EULA!)问题解决了。

I re-installed ttf-mscorefonts-installer (as shown above, making sure to accept the EULA!) and the problem was solved.

这篇关于使用Jasper Reports的JVM无法使用Font的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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