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/tes...
Post edited by: tsangcn, at: 2006/07/19 10:45
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/tes...
Post edited by: tsangcn, at: 2006/07/19 10:45
4 Answers:
Posted on July 20, 2006 at 4:43am
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?
Posted on July 20, 2006 at 4:45am
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?