zol777 Posted July 31, 2013 Share Posted July 31, 2013 Recently i have encountered a problem on display font in jdk 1.4 and jdk 1.6 under RedHat environmentSome of font cannot be displayed in jdk 1.6 environment. after reading those thread here , i have resolved the problem in the following steps1) tar the folder of /usr/share/fonts/msttcorefonts in old machine using jdk 1.42) untar the files in new machine using jdk 1.6 's folder /opt/ibm-java-x86_64-60/jre/lib/fonts3) execute the following command as root under /opt/ibm-java-x86_64-60/jre/lib/fonts in new machine jdk1.6sudo mkfontscalesudo mkfontdirsudo fc-cache -f -vafter 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 Link to comment Share on other sites More sharing options...
Solution zol777 Posted August 5, 2013 Author Solution Share Posted August 5, 2013 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 ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now