Recently i have encountered a problem on display font in jdk 1.4 and jdk 1.6 under RedHat environment
Some of font cannot be displayed in jdk 1.6 environment. after reading those thread here , i have resolved the problem in the following steps
1) tar the folder of /usr/share/fonts/msttcorefonts in old machine using jdk 1.4 |
after doing above steps , some font become visble but some font still invisible( it can be visible after extending text box height but it does not suggested to do so . since over 1000 jrxml is need to revamp)
here is the font i use for your references
<reportFont name="Arial_7" isDefault="false" fontName="Arial" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="/mnt/san/COMMON/res/mingliu.ttc,1" pdfEncoding="Identity-H" isPdfEmbedded="true"/> |
here is the text box jrxml for your references
<reportFont name="Arial_7" isDefault="false" fontName="Arial" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="/mnt/san/COMMON/res/mingliu.ttc,1" pdfEncoding="Identity-H" isPdfEmbedded="true"/> |
does anyone has encounter the similar problem? if the problem is realted to jre , OS or jasper report library?
Can any one give some idea on resolving this problem
1 Answer:
in both jdk 1.4 and jdk 1.6 , the following jrxml can be displayed in a proper manner
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="185" width="190" height="10" key="DISPLAY_SEQ_H" positionType="FixRelativeToBottom"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="3" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font reportFont="Arial_7" size="8"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[]]></textFieldExpression> </textField> |
the following jrxml is shown in a proper manner in jdk1.4 but not jdk 1.6
<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="60" y="195" width="190" height="8" key="DISPLAY_SEQ_H-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font reportFont="Arial_7" size="8"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["XXX:"+$P{REF_NBR}]]></textFieldExpression> </textField> |
the most obivous difference is the height label only . if i wanna synchronize the behaviour of jasper report. anyone have any idea ?