Jasper report can not load Japanese text with some fonts

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

I need print PDF report from Java application (Spring boot) which is can show Japanese characters and when change font, it has to show correctly font. My app using jasperreports-fonts-6.10.0.jar and setting in jasperreports_extension.properties is setting as below :

# font.xml place

and in fonts/fonts.xml, is setting as below :

<fontFamily name="Meiryo UI">
    <normal>fonts/Meiryo UI.ttf</normal>
<fontFamily name="Tahoma">
<fontFamily name="MS UI Gothic">
<fontFamily name="Times New Roman">

and in Java code :

myReport.getDefaultStyle().setPdfFontName(newfontReport); // newfontReport is setting in DB

All of above fonts are existing in resource of web app. But it only show japansese text and englist text correctly in report with "Meiryo UI". Other fonts (ex : "Times New Roman"), it show englist text parts only , japansese text parts are invisiblity. Have got any one can be show me why ?

hungncv.apt's picture
Joined: Nov 24 2013 - 11:08pm
Last seen: 2 years 4 months ago

1 Answer:

You can create a font set extension to include fonts that are for english and japanese. The font set can be exported to a jar file which can be placed on the JR server under web-inf\lib dir. Detailed information regarding font extension is available in the TIBCO JasperSoft Studio guide. 

vchiem's picture
Joined: May 1 2017 - 5:33pm
Last seen: 2 days 23 hours ago