JasperReports PDF Font Mapping

I have created a new JasperReports report with the bold and italic fonts in the iReport. The PDF preview in the iReport has shown the fonts right. But when I have exported PDF in my application by JRPdfExporter, all font properties were lost in the the PDF - just one normal Helvetica font has been used. I have fixed this by adding a jasperreports-fonts-xxx.jar into the classpath. However, it has more than 2MB and contains DejaVu fonts, which I do not want to use and they were not used for the PDF export, anyway. So I have stripped this JAR into the file jasperreports-fonts-light.jar. Add it to your classpath, but only when you do not want to use the original jasperreports-fonts-xxx.jar.

Disclaimer: This is just "works for me" solution. I do not have a clue, how the font mapping exactly works in JasperReports.

Post a comment here or under my blog post, if you have some suggestion. Thanks.