Can't get fonts installed with the TTFReader

Here should go questions about transforming XML with XSLT and FOP.
Trying

Can't get fonts installed with the TTFReader

Post by Trying »

I have followed the HOW TO Add a Font to the Oxygen built-in FOP pdf and I keep getting this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/fonts/apps/TTFReader

I am at a loss.

Thanks.
tavy
Posts: 363
Joined: Thu Jul 01, 2004 12:29 pm

Post by tavy »

Hi,

Please tell us on what platform you run <oXygen/> and what is your <oXygen/> instalation directory. We will try to reproduce your problem.

Best Regards,
Tavy
PeterRobertson
Posts: 47
Joined: Mon Apr 18, 2005 2:22 pm

Post by PeterRobertson »

I have just been directed to this page and I get exactly the same error.

What is the solution?

I am running on XP and Oxygen is installed in C:\Program Files\Oxygen 5.1
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

Just make sure the paths in the LIB and FONT_DIR variables point to the right directories. Also make sure the java command is on a single line.

Best Regards,
Sorin
PeterRobertson
Posts: 47
Joined: Mon Apr 18, 2005 2:22 pm

Post by PeterRobertson »

OK - I hadn't noticed the assumption that this was all being done in the Oxygen installation directory.

Now that is sorted, I get the following error:

Code: Select all

Reading C:\Windows\Fonts\TIMES.TTF...

Number of glyphs in font: 1674
Creating xml font file...

Creating CID encoded metrics
Writing xml font file TIMES.xml...

javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:\C:\Program%20Files\Oxygen%205.1\TIMES.xml (The filename, directory name, or volume label syntax is incorrect)
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hi again,

A bug in the Java 1.5 virtual machine from Sun Microsystems :) Run the java command inside the .bat script with an earlier version - for example 1.4.2_06:

Code: Select all


set CMD=C:\j2sdk1.4.2_06\bin\java -cp %LIB%\fop.jar; etc.
Best Regards,
Sorin
Post Reply