Jump to content
We've recently updated our Privacy Statement, available here ×

mreis

Recommended Posts

Our reports contain text elements defining a font using <font fontName="Arial" size="12" isBold="false" isItalic="false" pdfFontName="Helvetica-Bold" isPdfEmbedded="false"/>

We defined the pdfFontName attribute for every <font> tag (using either Helvetica or Helvetica-Bold as the value).

Due to the fact that our JVM (IBM V9) doesn't define a mapping for Arial, I get the following warning:  "Font 'Arial' is not available to the JVM." Nevertheless the pdf report is successfully rendered - the fonts that this pdf contains are Helvetica and Helvetica-Bold (as expected).

Then I created a fonts-extension jar including some metadata and the arial*.ttf font files. Now JasperReports finds Arial and doesn't bring out the warning .So far everything works as expected. The resulting PDF however now contains the following fonts: ArialMT and Helvetica.

My question is why (in the second case with the fonts-extension.jar) the resulting PDF doesn't contain Helvetica and Helvetica-Bold as its fonts (but instead ArialMT and Helvetica)? I'd like to find a way to eliminate the warning, and also get a PDF that contains Helvetica and Helvetica-Bold.

kind regards & many thanks,

markus

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 

Matt - after quite some research - I fully agree with you that we should avoid using the pdfFontName property for every <font> definition (using a different font for the fontName and pdfFontName property seems completely wrong).

On the one hand pdfFontName is a deprecated property and should thus be avoided, on the other hand a fontName (with corresponding fonts in the jasper font extension jar) overrides the pdfFontName anyway. using a font extension jar should further eliminate all my cross-platform problems.

one last negative aspect is that I couldn't eliminate the Helvetica font from the pdf - this topic can be found here: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=74379&topid=89864

I think I should file a bug for this ...

 

regards,

markus

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...