Jump to content
Changes to the Jaspersoft community edition download ×

External Font Problems

2006 IR Open Dicussion

Recommended Posts

By: Diogo Oliveira - diogosales

External Font Problems

2006-02-07 10:00

Hi all


i've been reading posts around this subject but i still can't get Arial to be avaliable both on report design and exported PDF.

I'm using linux so I got the arial ttf file from a windows box. Copied it to the fonts/ subdir, and add the fonts subdir in the startup.sh file.

In the proprieties, I select "External TTF Font..." and there arial.ttf is avaliable, so it's rendered in the final PDF. My problem is that it's not avaliable to be shown in design mode. How can I make it avaliable? Thanks in advance.





By: Diogo Oliveira - diogosales

RE: External Font Problems

2006-02-08 04:22

I have solved this but then one other problem rose that I haven't noticed: the selected external truetype font for pdf is not printed on the pdf. With JasperReports internal viewer of the generated report everything is fine, but wither saving in pdf from there or selecting PDF format as default build option, a pdf is generated with a default non-styled font (Helvetica i think). This is a major flaw and it's crucial to make my choice on which technology to be used for developing my project.

Is this easily fixed somewhere in the startup script or some? I added the fonts directory there which now allows me to correctly select an external ttf font for pdf, but the font is still not exported in the pdf file.

Thanks in advance for any replies.





By: Rodrigo Mascarenhas - cmascarenhas

RE: External Font Problems

2006-02-09 06:20

When you are choosing the font in the iReport, in the Font Properties you have the Font Name, Size and there is another field called PDF Font Name. Try to see what is selected in this field.


Hope it helps you.

Rodrigo Mascarenhas





By: Diogo Oliveira - diogosales

RE: External Font Problems

2006-02-09 10:03

It's set to External font name...". I don't know if I was clear enough so I'll bother to explain step by step this situation:

I'm using Linux, which does not have Arial TTF by default. So I got "arial.ttf" from a Windows box and saved it in the "fonts" subdirectory. Then I altered the "bin/startup.sh", adding these two lines for better organization in the file:


# truetype fonts for pdf export



and altering another one, like this:




so iReport could locate the "arial.ttf" file i put there.

I start iReport, I create a blank report, I add a text field. In its proprieties I set:


"Arial" in the "Font name" option;

"External TTF Font..." in the "PDF font name" option;

"Arial (arial.ttf)" in the "TrueType font" option;


I remember to set it bold and italic, and the letter R at the static text seperator as the text to display on the report.


I make sure build mode is set to "JRViewer Preview" ("Build" menu) and then I compile and execute the report. The JRViewer runs and everything is fine: Arial, Bold and Italic.


Now I get back and I choose "PDF Preview" from the "Build" menu. I execute it and with my PDF previewer (KPDF, also used evince, same thing), the resulting PDF shows up messed up: Helvetica (I recognize it from the twisted R leg), not bold and not italic.


What am I doing wrong?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...