Skip to main content

Content Starts Here

How to resolve font issue when generating reports on Linux?

Question
How to resolve font issue when generating reports on Linux?
Answer
When trying to regenerate ReadyAPI reports on Linux, you may encounter an error like this:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font "Arial" is not available to the JVM.

It occurs because not all the Linux installations include Microsoft core fonts, which are used in ReadyAPI reports. So, to fix the issue, you need to download the mscorefonts package.

1. To install this package in Ubuntu, try running the below command in Terminal:
wget http://httpredir.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb


Note: if you use another Linux distribution, refer to its documentation to learn how to install the package.

2.  After the installation is completed, you can see the fonts in /usr/share/fonts/truetype/msttcorefonts, copy all the ttf files to the {ReadyAPI install}/jre/lib/fonts directory if you are using the bundled ReadyAPI JRE. If you are using a stand-alone JRE, then copy the files to {JAVA_HOME}/jre/lib/fonts.

3.  Restart ReadyAPI - now, the needed fonts should be available to it.
Previous MonthNext Month
SunMonTueWedThuFriSat