I only use the Studio tool. It is ok when I preview the report, but it will happen when I export it.
How to export my report using Courier New font?
The textField model I used in the report:
< font fontName="Courier New" size="8"/>
< br />
Steps
Create a font in Jaspersoft Studio
You should use Window to create a new font -> Preference dialog:
Use “Font Family ”Dialog box, you can set the ttf file for the font:
Create report style
You should create a new style with the help of the context menu:
After that, you can set the font of this style:
After that, you can use this new style:
Example
jrxml file:
< band height="79" splitType="Stretch">
< p>The design of the report in Studio:
The result will be (a pdf file generated by Jaspersoft Studion and opened in Adobe Reader):
Note:
< p>You can find more information about Font Extensions here
I am using Jaspersoft Studio 5.2, I used Courier New font for the report, when I export it as When PDF, it changes the font to Arial.
I only use the Studio tool. It is ok when I preview the report, but it happens when I export it.
How to export my report using Courier New font?
The textField model I used in the report:
< font fontName="Courier New" size="8"/>
< br />
You should use the Font Extensions mechanism.
Footsteps
Create fonts in Jaspersoft Studio
You should use Window to create a new font -> Preferences dialog:
Using the "Font Family" dialog, you can set the ttf file for the font:
Create report style
You should create a new style with the help of the context menu:
After that, you can set the font of this style:
p>
You can use this new style later:
Example
jrxml file:
< br />
< br />
The design of the report in Studio:
The result will be (by Pdf file generated by Jaspersoft Studion and opened in Adobe Reader):
Note:
You can find more information about Font Extensions here
< p>