Installing extra fonts in Debian/Ubuntu systems

If when running DynamicJasper (or JasperReports itself) you find this exception

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details.

It’s because basic fonts are not present by default in most linux distributions (but they are in MS Windows) such as Verdana, to install them in Ubuntu do like this:

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

NOTE:┬áThis will install MS Window’s common fonts in your system, but it is highly probable that such fonts will not be present in other systems (i.e: another linux server), so the best approach it to package your fonts with your application.

Fork me on GitHub