Jump to content
Changes to the Jaspersoft community edition download ×
  • Font Extension Debugging Tip


    Jim W

    Issue Description

    There are plenty of content included in the documentation written about how to use a font extension.  This feature works quite well in general.  However, someimes mistakes can be made in the configuration or if there are other factors involved. The following are some troubleshooting suggestions if you cannot get a font extension to work.


    Resolution

    1. In log4j.properties, enable debug logging for net.sf.jasperreports.extensions.DefaultExtensionsRegistry to verify that the font extension jars are being loaded.

      You should see messages lines like the following in the log (note that you might need to restart if the extensions are already loaded):

      2016-11-15 12:55:21,314 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:167 - Loading JasperReports extension properties resource
      jar:file:/Users/lchirita/progs/apache-tomcat-8.0.24/webapps/jrs-release640/WEB-INF/lib/font-xyz-ttf.jar!/jasperreports_extension.properties
      2016-11-15 12:55:21,316 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:249 - Instantiating registry of type
      net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
      for property net.sf.jasperreports.extension.registry.factory.fonts
      2016-11-1512:55:21,317 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:274 - Instantiating extensions registry for fonts using factory class
      net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
      2016-11-1512:55:21,319 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:167 - Loading JasperReports extension properties resource
      jar:file:/Users/lchirita/progs/apache-tomcat-8.0.24/webapps/jrs-release640/WEB-INF/lib/font-xyz.jar!/jasperreports_extension.properties
      2016-11-15 12:55:21,321 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:249 - Instantiating registry of type
      net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
      for property net.sf.jasperreports.extension.registry.factory.fonts
      2016-11-15 12:55:21,321 DEBUG
      DefaultExtensionsRegistry,http-nio-8080-exec-9:274 - Instantiating extensions registry for fonts using factory class
      net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
    2. When you run the report in TIBCO JasperReports® Server  you can open a web developer tool [F12] and verify that the getReportComponents.html response contains a font called font-xyz_-en (or similar, depending on locale), and that the <span>  text element from the report has style=" font-family: 'font-xyz_-en'; ..." You can also check that the HTML document has charset=UTF-8 in <meta http-equiv="Content-Type">

      and that the request with _evendId=refreshReport also has UTF-8 in its response Content-Type header.


    Ref. Case 00071333


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...