Using OpenType Fonts (Reporting)

Hi All,

I am using iReport 3.5.1 and want to embed OTF-Fonts in the PDF exported by the JasperReports-Viewer. I can use the OTF-Fonts in iReport but I am not able to select the font in the “PDF Font Name”-property.
I have set the fontpath in the preferences and in the “PDF Font Name”-property are all TTF-Fonts listed. But the OTF-Fonts are not shown.
How can I embed the OTF-Fonts to the PDF. I know that the iText Libary ist able to embed them so it seems to be a Problem of iReport.

Are OpenType Fonts supported by JasperReport or iReport or has Java a problem with opentype fonts?

Best regards, Stefan

This sound like a question better asked on one of the JasperSoft forums and I see you have already found your way there! :)

Paul

Hi Paul,

yes I ask the same question here and in the JasperSoft forum to get more response! I hope there is a solution for this problem.

Stef

The trick that I have found is to fully specify the path and file name to the PDF embedded font rather than use the pull down menu.
So you would type in the field something like: “D:/myReportFonts/ocr10.ttf”. Just be sure that this is able to be found by the iReport.
Another “trick” is to add the path name for the font to the environment variable “CLASSPATH” so that iREPORT finds it upon start up.

Hi Thomas,

I set the “CLASSPATH” in iReport an the TrueType Fonts (TTF) are found and shown in the DropDown. But the OpenType Fonts (OTF) are not shown. I tried your trick and set the full PATH to the Font File but it doesn’t work.

Stef

I just tried it and it works fine.
Attached is a screen shot of what I mean when I say type in the pdf font name area the entire path and font name.
Unfortunately you have to set the pdf font for each text field this way…
In my test case I placed the otf fonts in a sub-directory off my ireports directory.
(Ialso put them into my windows/fonts directory but this did not seem to be picked up as you say).

Hope this helps.

I tried the same but it did not worked. Can you send me the OTF Font you used? Then I can test it under the same conditions.

My e-mail address is getintouch@seven-r.ch

Regards, Stef