Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu is missing windows fonts?

I am having a Java based web application running in Amazon EC2 Ubuntu server. I use Jasper reports to generate some reports in PDF format. I built these reports using 'Jaspersoft Studio'

Now, when I try to generate reports, I get this error

net.sf.jasperreports.engine.util.jrfontnotfoundexception font 'Times New Roman' is not available to the jvm

Googled and found this is due to Ubuntu missing windows based fonts. All the posts I found on internet about this issue are pretty old. So how can I solve this issue?

like image 919
PeakGen Avatar asked Dec 25 '22 16:12

PeakGen


1 Answers

Just install the Windows fonts in your Ubuntu Server. Here you have a useful tutorial for it.

If you are as lazy as me, here you have this command which we'll do it entirely for you :)

sudo apt-get install ttf-mscorefonts-installer

In case you face any issues during installation of this package, it can be due to the fact that dpkg is locked. To circumvent this issue, restart your computer and enter this command in Terminal.

sudo dpkg --configure -a

ttf mscorefonts installer can also be installed from the packages available at the link given below.

Download ttf mscorefonts

like image 120
arodriguezdonaire Avatar answered Dec 27 '22 06:12

arodriguezdonaire