JDK 6_45 contains an unresolved problem. Sometimes (on some, not all servers, confirmed at Windows systems) when calling java.awt.Font.createFont(int, InputStream) (inputStream = i.e. file "net/sf/jasperreports/fonts/dejavu/DejaVuSans.ttf") the font is not properly loaded with exception
java.io.IOException: Problem reading font data.
at java.awt.Font.createFont(Font.java:924)
i.e. net.sf.jasperreports.engine.fonts.SimpleFontFace.(SimpleFontFace.java:100) throws JRRuntimeException: java.io.IOException: Problem reading font data.
Possible solution (not tested yet, but adviced at http://www.martianstorm.com/wordpress/?p=103): Save the input stream in temporary file on disk and use method java.awt.Font.createFont(int, File fontFile) instead.
Recommended Comments