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 is installed, but I guess the JVM is not using any fonts from it.
I'm using Ubuntu 10.04.
How can I fix this?
sudo apt-get install msttcorefonts
works (on our Ubuntu development environment), but is not a very good solution.Instead, we bundled the fonts with our application based on this tip. Their JAR file bundles the following fonts,
Direct Link to download jar: Maven ver 1.0. DynamicFonts
I solved this by choosing 'SansSerif' or 'Serif' only and not 'Arial' or 'Times New Roman'.
You can do it by installing fonts, that means everywhere you want to run that particular application. Simplest way is just add this bl line to your jrxml file:
Hope it helps.
Solution in 2 steps (if you are using centOS)
Download the Microsoft core fonts rpm package.
Install rpm package.
I tried installing mscorefonts, but the package was installed and up-to-date.
I tried searching for the font in the filesystem, with:
This folder just had the README, with the correct instructions on how to install.
You need an internet connection for this:
I re-installed
ttf-mscorefonts-installer
(as shown above, making sure to accept the EULA!) and the problem was solved.Create jasper report in multiple languages(Unicode)
1)Install font in ireport desginer
2)create extension of font(we will use it in applications classpath)
3)install font on os(optional)
4)paste all .ttf of font in jre->lib->fonts directory (otherwise web application will throw error font is not available to JVM)