Closed Winterwind83 closed 5 years ago
What Java/JRE are you using?
With "myanmar" added as net.sf.jasperreports.export.pdf.glyph.renderer.blocks.x, the PDF output relies on the AWT/JRE text layout, so we first need to look into whether the specific Java version is able to properly layout the Myanmar text.
We were using an Oracle JRE 1.8.0_201.
Inspired by your query, I tried running the same report with Java 11, and it came out perfectly. So I guess that would explain the issue.
Thank you muchly!
We are trying to create reports (with output as PDFs and images) with Myanmar fonts ('Myanmar Text' and 'Padauk'). We have created font extensions with these fonts, and those extensions are on our application's class path. Unfortunately, we are running into an issue with JasperReports not applying ligatures properly.
The problem can be reproduced with a simple Report consisting of nothing but a single Text Field or Static Text with, for example, the following content: လက်ကားဖြန့်ချီရေး
This is what the output should look like (generated by JasperReports exporting to html):
This is what it looks like instead (generated by JasperReports exporting to pdf):
The above examples were created with the 'Myanmar Text' font; using other fonts yields results that are different but just as wrong - for example, ignoring ligatures entirely, rather than applying them incorrectly.
In this Community discussion, a potentially related problem with Thai fonts was discussed; there, adding the following property to the report fixed the issue:
<property name="net.sf.jasperreports.export.pdf.glyph.renderer.blocks.x" value="thai"/>
We tried adding that property to the report (replacing "thai" with "myanmar", which is the name of the appropriate Unicode block), and the subsequent output of the JasperReports Library indicates that it can resolve the AWT and PDF fonts and use the glyph rendering then; however, unfortunately this did not affect the actual output whatsoever.