Jump to content
We've recently updated our Privacy Statement, available here ×

jamesbutler

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by jamesbutler

  1. @diogopaludo: To clarify, I am both developing and deploying on Linux. I have removed the Microsoft font package from my dev machine to debug this issue (to the detriment of my web browsing experience), and can see the fonts being loaded and failing to work. For reference, the font family definition in the jar is: <?xml version="1.0" encoding="UTF-8"?><fontFamilies> <fontFamily name="Arial"> <normal><![CDATA[fonts/ARIAL.TTF]]></normal> <bold><![CDATA[fonts/ARIALBD.TTF]]></bold> <italic><![CDATA[fonts/ARIALI.TTF]]></italic> <boldItalic><![CDATA[fonts/ARIALBI.TTF]]></boldItalic> <pdfEmbedded><![CDATA[true]]></pdfEmbedded> </fontFamily></fontFamilies> I have also tried adding the pdfEncoding and exportFonts tags, although I can't find much documentation on what the latter does: <?xml version="1.0" encoding="UTF-8"?><fontFamilies> <fontFamily name="Arial"> <normal><![CDATA[fonts/ARIAL.TTF]]></normal> <bold><![CDATA[fonts/ARIALBD.TTF]]></bold> <italic><![CDATA[fonts/ARIALI.TTF]]></italic> <boldItalic><![CDATA[fonts/ARIALBI.TTF]]></boldItalic> <pdfEncoding><![CDATA[identity-H]]></pdfEncoding> <pdfEmbedded><![CDATA[true]]></pdfEmbedded> <exportFonts> <export key="net.sf.jasperreports.html">Arial, Helvetica, sans-serif</export> <export key="net.sf.jasperreports.xhtml">Arial, Helvetica, sans-serif</export> </exportFonts> </fontFamily></fontFamilies> Thanks for the response. Post Edited by jamesbutler at 05/08/2012 22:31
  2. Hi all, We are using the JasperReports engine 4.5.0, and reports designed with iReport 4.5.1. We have packaged the Arial font in an extension jar as described in the documentation; when I debug starting from the SimpleFontExtensionHelper class, I can see the font jar being read and new SimpleFontFace instances being created for each .TTF file inside.When reports which specify "Arial" as a text font (for both report text and chart labels) are generated on a server which doesn't have Arial installed (which is the case for many/most Linux server deployments) then the server-rendered Arial text doesn't work. This shows up differently for both PDF export and JFreeChart generation.When a PDF is generated, the following exception is logged: Caused by: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details. at net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358) etc., and an empty PDF is generated. For those charts which specify Arial as a title or legend font, a fallback font is chosen from the operating system, often with very different metrics. If either Arial is installed on the OS or the correct .TTF files are dropped into the JRE's lib/fonts/ directory, both chart and PDF generation work as expected. If anyone can suggest what we can do to get the font extension working, I would be very grateful. Post Edited by jamesbutler at 05/07/2012 21:10
×
×
  • Create New...