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

Why iReport change font tag when reportFont used


tsangcn

Recommended Posts

I come across a problem in using reportFont in iReport.

 

In my jasperreport, I have defined reportFont as follows :

 

<reportFont name="details" isDefault="true" fontName="Courier New" size="9" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Courier" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

<reportFont name="dm" isDefault="false" fontName="Domestic Manners" size="18" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="/tmp/Domestic_Manners.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/>

 

Then, in a textElement, I defined its font as :

 

<font reportFont="dm"/>

 

When I open the jasperreport with iReport 1.2.5, and then click the save button to save it (no other actions has been done), the font tag for the textElement will incorrectly becomes :

 

<font reportFont="dm" fontName="Courier New" pdfFontName="Courier" size="9" isPdfEmbedded ="false"/>

 

which will cause the following error :

 

Error exporting print...

ExceptionConverter: java.io.UnsupportedEncodingException: Identity-H

 

The exception is caused by the change of the font tag by iReport to include fontName, pdfFontName, size and isPdfEmbedded attributes when reportFont attribute is used. The problem exists in iReport 1.2.1, iReport 1.2.2, iReport 1.2.3, iReport 1.2.4, and iReport 1.2.5. It does not exist in iReport 1.2.0 and before.

 

Now, I must stick to iReport 1.2.0 and cannot use higher version of iReport.

 

Include with this post, please find the jrxml for testing.

 

Please help.

 

Thanks

C. N. [file name=test2a.txt size=2721]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test2a.txt[/file]

Post edited by: tsangcn, at: 2006/07/19 10:45

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Although font tag is deprecated, it is still work in JasperReports with the same behaviour as before. But the behaviour of the font tag in iReport is changed since version 1.2.1. Why is there a change whose result seems incorrect? Why not the behaviour keep the same as it is before 1.2.1 until the font tag is removed?
Link to comment
Share on other sites

Although font tag is deprecated, it is still work in JasperReports with the same behaviour as before. But the behaviour of the font tag in iReport is changed since version 1.2.1. Why is there a change whose result seems incorrect? Why not the behaviour keep the same as it is before 1.2.1 until the font tag is removed?
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...