Jump to content
JasperReports Library 7.0 is now available ×

Problem with external fonts


imanol00

Recommended Posts

Hello everybody!

 

I have been reading a lot about this question in several forums, but I haven't found a solution yet.

 

I think that what I want to do is very simple: I want to use an external True Type Font in my reports.

 

I´m developing a desktop aplication in Java, using Eclipse for Windows, JasperReports 1.2.7 and iReport 1.2.7.

 

I have tried lots of things, all in vain: putting the %WINDOWS%fonts folder into the CLASSPATH variable, copying my own fonts into the "fonts" folder of iReport (and restart iReport), PDF embedding, not embedding...and so on, with no result.

 

The only result I got is... the following Exception!! :

 

net.sf.jasperreports.engine.JRException: Could not load the following font :
pdfFontName : MyFont.TTF
pdfEncoding : CP1252
isPdfEmbedded : false
at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1390)
...
...
...

 

Can somebody help me?

 

Thanks a lot, JasperUsers!!

Post edited by: imanol00, at: 2006/10/30 15:11

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks teodord!!

 

I finally solved my problem, but not the way I would liked (a typical situation in a programmer's life...hehe).

 

At the end I realized that the field "PDF Font" referred to the name of the file containing the font itself.

 

As I said, I tried all the things I read in the posts of this forum, with no result. The only thing that worked was so simple that I almost cried when I did it... I put the font file in the working directory of my project... so ugly, so efficient!

 

But I have a new question... does anybody know how to modify the ".classpath" file created by Eclipse to be able to use external fonts from another folder?? Or any idea like that??

 

Thans a lot!!

Post edited by: imanol00, at: 2006/11/01 14:46

Link to comment
Share on other sites

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...