I am working on a Java project that uses Jasperreports. I worked several times in other projects using the same technology, and I had the same problem when trying to print a report in Unix environments.
My project uses:
- JBoss 4.2.3.GA
- Java 1.6
- Jasperreports 4.7.0
The exception is:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details.
I found a general solution to solve this problem and really works:
sudo apt-get install msttcorefonts
However, I want to understand how Jasper works with fonts and how it searches for these fonts installed on Unix environments. Perhaps the best question is: how does the JVM handle native fonts? Can someone give me a detailed explanation on this? How are system fonts available to the JVM at runtime?
source
share