Font Extension Reports Guidelines¶
Although using different fonts in your report seems simple, but there are a lot of problems!! The main problem is that the available fonts are provided by the operating system and for this reason you can have:
A font that it is available in one operating system isn't available in another.
A font can be available in different operating systems but it could be slightly different from one to another.
Also, the font problem could be even more problematic when using the exporters - in particular, the PDF exporter. The PDF format has its own set of fonts. And, if a document needs to use other fonts, they must be embedded inside the PDF.
To overcome these problems, the user can use external font files instead of the system provided fonts. In this way, the report will be independent of the operating system fonts and have the same appearance everywhere. This can be done using a Font Extension.
*Add Font-extension in servoy_jasperreports plugin
Follow the below steps to add font-extension to the plugin:
- To create font extension in jasperreport-studio please follow the steps in this document: https://community.jaspersoft.com/wiki/custom-font-font-extension and then export the font as a jar file (font_extension.jar).
- Copy the exported font extension jar (font_extension.jar) in the <servoy_install_path>/plugins/servoy_jasperreports folder.
- Modify servoy_jasperreports.jar.jnlp file accordingly to the changes done following; simply add the following lines to the jnlp file:
<jar href="/plugins/servoy_jasperreports/font_extension.jar" download="lazy"/>