I have tried to use Dynamic Japser in my application. Everything seems to work well when the application is deployed in server running under windows machine.
But I need to deploy the application server under unix machine. When I deploy the same application and run under unix machine the font is not available and the following error is diplayed:
net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'VERDANA_MEDIUM' is not available to the JVM. See the Javadoc for more details.
at net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358)
at net.sf.jasperreports.engine.util.JRStyledText.getAwtAttributedString(JRStyledText.java:226)
at net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:362)
at net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:1129)
at net.sf.jasperreports.engine.fill.JRFillTextField.prepare(JRFillTextField.java:540)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:378)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:440)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:403)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:864)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperPrint(DynamicJasperHelper.java:284)
at ar.com.fdvs.dj.core.DynamicJasperHelper.generateJasperPrint(DynamicJasperHelper.java:236)
I have created the following Font instance in my java file:
Font font = new Font(28,"VERDANA_MEDIUM","VERDANA_MEDIUM",Font.PDF_ENCODING_Identity_H_Unicode_with_horizontal_writing,true);
Style titleStyle = new StyleBuilder(false).setFont(font).build();
/**
*Above the font name VERDANA_MEDIUM was used but any of the valid names that can work with default available Fonts under unix machine is highly appreciated
*/
The font is used for different styles in the report that will be generated.
Can any one track the issue and guide me for the fixes or any hints.
Thanks,
Ramesh.
