iReport exported pdf does not show correct font
A PDF generated in iReport using开发者_开发百科 the 'Times New Roman' font appears to be using 'Arial' for its print version.
Any idea what the problem is?
I've found that, at least for me, I must explicitly set the pdfEncoding attribute, as well as pdfFontName and isPdfEmbedded, on each font tag in the xml, even when using the system encoding, and that "Identity-H" seems to be needed when using unicode.
So:
- Make sure your ttf font files are available on the classpath
- <font ... pdfFontName="filename.ttf"
- isPdfEmbedded="true"
- pdfEncoding="Identity-H" ... />
have you set the PDF Font Property to Times New Roman as well, or just the Font property?
Have you tried adding your system fonts directory to the classpath?
精彩评论