Jasper and custom fonts

Questions and answers on developing, deploying and using plugins and JavaBeans

Jasper and custom fonts

Postby steve1376656734 » Mon Jul 01, 2019 6:22 pm

Hi,

Can anyone help me figure out how to get custom fonts to work with Jasper please. I have followed the advice given on the Jaspersoft community to create a font extension jar (https://community.jaspersoft.com/wiki/custom-font-font-extension) and have included this jar file in the servoy-jaspersoft directory on the server. I have also tried following the advice given on the servoyforge Jasper plugin page (https://www.servoyforge.net/projects/se ... ease_notes) albeit this seems to be for a very old release. Nothing seems to work and I constantly get the following error message when I try to run a report with the custom font in it:

Code: Select all
java.lang.Exception: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font "Font Awesome 5 Pro Regular" is not available to the JVM. See the Javadoc for more details.


I'm relatively new to Jasper so would appreciate any advice on solving this one.

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 224
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: Jasper and custom fonts

Postby lwjwillemsen » Mon Jul 01, 2019 10:33 pm

+1 for documentation on how to...
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 624
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Jasper and custom fonts

Postby tgs » Tue Jul 02, 2019 11:13 am

I had the same problem with ArialMT.
The customers environment is macOS, also the Servoy App Server and ArialMT ist not part of the Fonts Library.
Since I have downloaded the ARIALMT.ttf and imported to the Fonts Library, the Jasper Reports are working without any font issue.
Are your custem fonts installed on the Servoy App Server machine?
Maybe this will help?
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 861
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Jasper and custom fonts

Postby robert.edelmann » Tue Jul 02, 2019 1:15 pm

When using the smartclient, the font is needed on the client-machine, when generating a pdf on the server the font has to be installed on the server (and we had to restart tomcat / servoy for the font to be working).

We still have some problems with glyps (checkboxes etc) when generating pdfs and printing bold/italic.
User avatar
robert.edelmann
 
Posts: 5
Joined: Wed Aug 14, 2013 6:12 pm

Re: Jasper and custom fonts

Postby steve1376656734 » Tue Jul 02, 2019 8:12 pm

Hi Thomas,

tgs wrote:Since I have downloaded the ARIALMT.ttf and imported to the Fonts Library,

When you say "imported into the fonts library" what do you mean exactly? Is this a library on the server or something that is part of the Jasper stuff?

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 224
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 1 guest