Home pageFind It!Contact PJAPJA documentation


 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Unknown PJAF data format


Member since : Feb 7, 2005
Messages : 1
 Feb 7, 2005 at 10:10 AM

I have to create image with text on AIX 4.3 system withot X11, so I used PJA framework, but IOException: Unknown PJAF data format appears. In this directory I heve Arial.pjaf file and font directory is set to this directory too. Here's some code:

System.setProperty("awt.toolkit", "com.eteks.awt.PJAToolkit");
System.setProperty("java.awt.fonts", "/path/to/fonts");
System.setProperty("java2d.font.usePlatformFont", "false");

PJAImage image = new PJAImage(100, 100);
PJAGraphics g = (PJAGraphics)image.getGraphics();

PJAFontData pjafd = new PJAFontData(new FileInputStream("Arial.pjaf"));

g.setColor(new Color(255,255,255));
g.setFont("Arial", 1, 12);

Does anyone know what a forgot or doing wrong?



Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Feb 9, 2005 at 6:45 AM
I don't think you need to set any System property if you use directly PJA classes.
But in this case, you *must* create a .pjaf file on a machine with a valid display and then transfer it in your AIX system.
Did you check the file was correctly transfered (same size as the original) ?

The directory where are placed .pjaf files may be the directory specified by "java.awt.fonts" System property *or* the current working directory (returned by "user.dir" System property).
As any valid .pjaf font files placed in this directory will be loaded directly as soon as you call image.getGraphics(), you don't have to use PJAFontData class.

I hope you will succeed to make it work. Please, keep us informed...
Manu (moderator/modérateur)

Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation