Jump to content
Changes to the Jaspersoft community edition download ×

Embedding fonts


2005 IR Help

Recommended Posts

By: Jindra Vavruska - ok1fou

Embedding fonts

2002-11-26 14:54

Hello,

 

I am trying to embed truetype fonts. A friend of mine says it works for him. We both run a report from Apache Tomcat. It is both compiled and executed (generated) by servlets. His reports works fine when he puts the .TTF files in the same directory as the XML definition. I only get Java exception "System cannot find the file specified" regardless of where I put the font files (webapp root, same directory, classes directory, lib directory, etc...).

 

How is it possible that it once works and the other time not?

 

Jindra Vavruska

 

 

 

 

By: Ruben Misrahi - rnmisrahi

RE: Embedding fonts

2003-12-09 12:26

Same here.

 

The question is: Where are we supposed to place the ttf files?

 

Anyone?

 

 

 

 

By: Ruben Misrahi - rnmisrahi

RE: Embedding fonts

2003-12-09 12:29

Actually...

 

There is a simple solution: Use the full path of the ttf files in the text property : "C:/Reports/<font>.ttf"

 

The problem is that we cannot be sure where a user will install the reports and/pr the fonts.

 

 

 

 

By: Teodor Danciu - teodord

RE: Embedding fonts

2003-12-09 12:42

 

Hi,

 

For the best portability, the TTF files should be placed

in the classpath and loaded from there as resources.

This is how all the samples supplied with the project

work.

 

The "pdfFontName" should indicate the classpath

location as a String. And the font should be also

installed on the system so that it is available to the

JVM as a physical font, for use inside the "fontName"

attribute.

 

I hope this helps.

Teodor

 

 

 

 

 

By: Mr Kanniget - kanniget

RE: Embedding fonts

2004-07-29 20:20

How do we get the JasperExportManager.exportReportToPdfFile to do this? I have put the fonts in the class path, the only way I can get them to work is via complete path reference inthe xml file.

 

 

 

 

By: Ruben Misrahi - rnmisrahi

RE: Embedding fonts

2004-08-02 21:14

All this sounds good and nice, unfortunately it doesn't work.

 

I had to include the complete path of the font in jasper.

 

 

 

 

By: Mihir Parekh - mihirparekh

RE: Embedding fonts

2004-07-30 03:54

We have been able to use ttf the fonts by placing them under webapps/$APP_NAME/WEB-INF/classes or by placing them under $TOMCAT_HOME/common/classes.

 

 

 

 

By: Paul Dunnavant - paulie1000

RE: Embedding fonts

2004-08-05 13:02

I'm having a similar problem with embedding a font. This isn't a TTF font, though. It's an OCRA font with an extension of .PFM. Would this work the same as a TTF file?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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