Jasperreports plugin and fonts

I know this is a Jasperreports issue rather than a Servoy plugin problem, but I can’t seem to find or understand a solution to it elsewhere so maybe someone here can clarify. I know that reports developed in iReport 3.5.2 wont run with the Jasperreports 3.7.1 plugin because it can’t find the fonts. I used the default fonts in 3.5.2 (sanserrif, etc.) when creating the reports. I know I can edit all the reports and replace the fonts with actual installed fonts. But there are font jars, e.g., jasperreports-fonts-3.7.1.jar and jasperreports-djavu-fonts.jar. Do these contain fonts? Do either contain the fonts that are missing? If so, how can I get the jaspereports plugin to see them?

Michael,

Try putting the font jars in one of the extra-directories configured on the plugins config on the Servoy Admin page.

http://groups.google.com/group/servoy-j … ab0ba0a67#

Rob

Rob in the latest two beta’s, the whole font thing is broken.
It works for creating pdf’s on the server.

but the viewer now, does not start anymore, and gives an error that the font is not available to the jvm (in case you have used a font in the report, that is not locally installed)
in the older version, this was fine, and the font was replaced by, a default font, which was fine, in most cases.

see my issues I have filed on the google-page: (issue 22)
I have also filed a new issue, but it’s a pitty, that the google-code section, is not as responsive as this forum :-(

Thanks Rob, that didn’t seem to work bu probably because the font isn’t in those jars. Maybe the font “sanserif” doesn’t exist at all. Apparently earlier version of jasperreports default substituted a real font for the missing fonts by default. That is no longer the default but it can be changed. According to sourceforge forum “You can do this by setting the net.sf.jasperreports.awt.ignore.missing.font=true in the jasperreports.properties file or as a custom property in that particular report template.”

Is there a way to do this with Servoy plugin? I tried creating a the jasperreports.properties file and placing it in various folders but nothing worked.

Michael,

Have you tried placing the jasperreports.properties file in one of the ‘extra’ directories that can be configured for the plugin?

Rob

Yes, I have placed it in the folder specified and it still doesn’t seem to have any effect.

In iReport using Tools>Options>iReport>Fonts I created a font-extension. Put this extension in the directories.jasper.extra directory. No effect.
The error is: ```
Error during runReport = JavaException: java.lang.Exception: Font ‘Corbel’ is not available to the JVM. See the Javadoc for more details.

Hi,

Please create a very small sample solution that uses a very small sample report that uses a custom font.
File a case in our support system with these attached.

http://servoy.com/s

Rob

Hi,

This issue has been fixed and the fix is available in the next release of the Servoy JasperReports Plugin.
Also, further details shall be given along with the next release.

Regards,
Andrei

I have a problem with created records in Servoy Client on a Win 7 PC and running JasperReport for it. I get the error:

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font ‘Poor Richard’ is not available to the JVM. See the Javadoc for more details.

This issue occurs only by creating records on one of 10 PC’s in the network. 7 of them have installed the font ‘Poor Richard’, 3 not. When I try to print the report on an other PC, I always get the error.

Why does Servoy and/or JasperReport takes that font? It is not defined on any form and used as textformat.
How can I fix that major problem?

Serovy 5.2.1
servoy_jasperreports_plugin_3.1.0_b3
jasperreports-3.7.3.jar
Java 1.6_20

I’m almost 100% sure, that that font is used in your report!!
(search in the jrxml for that name)
but, if you DO need that font, it depends, on what function you use.

if you print to pdf (serverside, so not using foundsets) the font has to be available on the server.
if you use printing to viewer, the font has to be available on the local machine.

now with the new jasper report plugin, you can use an extra: font_extension.jar
you can make that jar, in ireport (search for export to font extension) and include that jar in your servoy jasper jnlp.

see here: viewtopic.php?f=15&t=14445&st=0&sk=t&sd=a&hilit=jasper+beta#p76430

Hi Harjo,

Harjo:
I’m almost 100% sure, that that font is used in your report!!
(search in the jrxml for that name)

the font definitely isn’t in the reports. I always use ‘Verdana’ as the default font. But I have searched throught each report and don’t found a font named ‘Poor Richard’. Or would you say that the user has formatted a textvalue to that font?

if you use printing to viewer, the font has to be available on the local machine.

The font is(was) installed on the local PC and the user got the error when he has tried to open the report by JasperViewer. Printing was also not working, but this f… font is sure not installed on a Mac server.

We have now removed the font from all PC’s and JasperReport is working as expected (like before). I’m still asking me why/how could the font get to the record and report AND it’s only one master and three related records ‘infected’.

now with the new jasper report plugin, you can use an extra: font_extension.jar
you can make that jar, in ireport (search for export to font extension) and include that jar in your servoy jasper jnlp.

Am I right that I have to create such an extension with all fonts not installed by default? What’s about a setting like “ignore not default fonts” or anything else?

strange… never seen this before.

No, you can use the font_extension.jar for when you use fonts in your reports, that are not default installed on the server and/client.
fonts in that jar, than even works in the jasper_viewer.

about the “ignore not default fonts”
in older versions of jasperreports, this was the default way! But as far as I understand, this was giving much trouble, so they changed that, and the prefered way is now, to use reportfonts in combination, with the font_extension.