Font "Arial" not available for JVM

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?

+5
source share
5

Java . , .

http://en.wikipedia.org/wiki/Arial , MS-Windows MAC OSX

+4

, , - "" Ubuntu. MS Fonts, .

Ubuntu Systems.

+2

Jasper 5.0. :

  • jasper-fonts.jar;
  • linux;
  • JBoss.
0

2015 :

( )/etc/apt/sources.list

deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

:

sudo apt-get update
sudo apt-get install msttcorefonts
0

OpenSuse

SO fc-list | grep "Arial"

sudo rpm -ivh msttcore-fonts-2.0-3.noarch.rpm

:

http://www.mjmwired.net/resources/mjm-fedora-f11.html#ttf

rpm

fc-list | grep "Arial"

0

All Articles