Messages of subject
font.properties on z/OS |
Thomas42
Location : Germany
Member since : Sep 17, 2003
Messages : 1
|
Sep 17, 2003 at 8:30 AM
Hi,
first of all: Yes, PJA works on IBM z/OS, formerly known as OS/390 and MVS.
PJA is great, thanks to everybody involved.
The only Problem we have is, that the PJA font.properties is not read, instead the Java font.properties in /usr/lpp/java/IBM/J1.3/lib.... is used.
Setting user.home does not seem to have any effect.
Any Ideas?
Regards,
Thomas
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
Sep 21, 2003 at 5:34 PM
> Setting user.home does not seem to have any effect.
Did you put the font.properties file in a subdirectory lib of user.home ?
Anyway you may change the font.properties file in /usr/lpp/java/IBM/J1.3/lib... --- Manu (moderator/modérateur)
|
jofowler
Location : Research Triangle Park, NC USA
Member since : Sep 26, 2003
Messages : 4
|
Sep 26, 2003 at 4:26 AM
I am also having problems with fonts using PJA on z/OS.
I have a java application that runs on Websphere 5 on z/OS running
Java 1.31. This application uses a 3rd party charting package to
dynamically generate graphs as JPEGs.
I have followed the instructions to install PJA and have managed to
get graphs with text on them working, but not without uploading fonts
from a Windows XP machine to the z/OS machine's font directory.
Unfortunately this is not an acceptable solution for my situation.
In addition to the recommended PJA settings I have been experimenting
to try and find a combination that works without requiring me to upload
fonts from Windows. There is a perfectly good set of true type fonts
included with the Java Runtime on z/OS. The Lucinda fonts in this
directory on z/OS are identical to the ones shipped with the Java JDK
Windows.
Scenario 1:
java2d.font.usePlatformFont=false
fonts from \Windows\Fonts not uploaded to z/OS
results: Graph is generated but all text is missing
Scenario 2:
java2d.font.usePlatformFont=true
fonts from \Windows\Fonts not uploaded to z/OS
results: Websphere JVM crashes when graph is run
Scenario 3:
java2d.font.usePlatformFont=true
fonts from \Windows\Fonts ARE uploaded to z/OS
results: Graph is generated and includes text
Originally the application used the graphing package's default
fonts. In an attempt to get around this problem, I added code
to set the font of all graph text to Dialog, Font.PLAIN in the
hope that use of a logical font name that is listed in the font.properties
on z/OS would eliminate the need for Windows fonts. This change made
no difference.
I have tried using the font.properties that ships with PJA as well
as the font.properties that ships with the Java 1.31 JDK on z/OS.
Both fail when Windows fonts are absent and work when Windows fonts
are present.
Any idea why the Windows fonts are needed and how to get around the problem?
The graphing package is JClass serverviews 3.0.
I have found a support forum entry for a nearly identical problem using this
graphing package with PJA on a headless AIX workstation. Unfortunately, the
solution provided by the vendor is to copy \Windows\Fonts to the AIX machine.
See http://java.quest.com/support/search/JclServerChart/fq/jcl_serverchart_fq_13.html for details.
Suggestions? Hints?
Thanks in advance for any assistance or advice you can provide. --- --
Jim Fowler
|
jofowler
Location : Research Triangle Park, NC USA
Member since : Sep 26, 2003
Messages : 4
|
Sep 29, 2003 at 5:09 AM
I experimented further and found that I was able to get my graphs generated with text by uploading just the \Windows\Fonts\arial.ttf file to my z/OS fonts directory rather than all of the Window fonts.
Still I need a solution that does not require the use of Microsoft fonts. The JDK on z/OS includes a perfectly good set of true type fonts and I'd like to just use them.
I wonder if the problem could be that the code that reads the font.properties file when PJA is installed assumes that the encoding of the font.properties file is always ASCII. This is not the case on z/OS. Text files on z/OS are encoded in EBCDIC.
Is there code somewhere in PJA that reads the font.properties file?
If this is the problem, it should be relatively easy to correct in a platform independent way so that it will work correctly regardless of the file encoding used.
I'd be glad to help test a fix on z/OS if this turns out to be the case.
Thanks for any assistance you can provide.
--- --
Jim Fowler
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
Sep 29, 2003 at 8:38 AM
> Is there code somewhere in PJA that reads the font.properties file?
No, the classes that read the font.properties file are classes from the JDK itself. You should really study the documentation about font.properties at http://java.sun.com/products/jdk/1.2/docs/guide/internat/fontprop.html to see if you can use the True Type fonts files from z/OS.
From this documentation, it seems that only TrueType and Postscript Type1 fonts are supported.
Do you know the type of fonts files you get on z/OS ?
> I'd be glad to help test a fix on z/OS if this turns out to be the case.
I hope you'll succeed or at least that you'll get a definitive answer of the possibilities you have or have not for z/OS... --- Manu (moderator/modérateur)
|
jofowler
Location : Research Triangle Park, NC USA
Member since : Sep 26, 2003
Messages : 4
|
Sep 29, 2003 at 8:08 PM
> From this documentation, it seems that only TrueType and Postscript Type1 fonts are supported.
> Do you know the type of fonts files you get on z/OS ?
Yes, the fonts provided for z/OS are those that are shipped with the
IBM java JDK 1.31. They are all TrueType fonts and I have listed them
below. Out of curiosity I compared the Lucida fonts on z/OS with the
Lucida fonts on my Windows box that were shipped with the Java JDK there.
The font files are identical. The IBM JDK on z/OS ships a font.properties
file of its own that references these fonts. I have tried running with
both the IBM font.properties file and the PJA font.properties file.
The results are the same. Unless I set java2d.font.usePlatformFont=true
my graphs do not contain any of the text that I put in them.
When I do set java2d.font.usePlatformFont=true, the JVM crashes with the
message:
Fatal Error: No usable fonts found.
unless I add the font file arial.ttf to my font directory on z/OS. When I add
arial.ttf the graph is created with my text. I do not understand why the JVM is unable to find any usable fonts when all of the fonts listed below are present in the same directory where I put arial.ttf to make things work.
In my code, I make no references to arial font. I set all fonts that I know about to Dialog which is mapped to Lucida in the font.properties file.
Court___.ttf LucidaSansOblique.ttf
Courtb__.ttf LucidaSansRegular.ttf
Courtbi_.ttf LucidaTypewriterBold.ttf
Courti__.ttf LucidaTypewriterBoldOblique.ttf
LucidaBrightDemiBold.ttf LucidaTypewriterOblique.ttf
LucidaBrightDemiItalic.ttf LucidaTypewriterRegular.ttf
LucidaBrightItalic.ttf Thonb___.ttf
LucidaBrightRegular.ttf Thonbi__.ttf
LucidaSansDemiBold.ttf Thonburi.ttf
LucidaSansDemiOblique.ttf Thoni___.ttf
--- --
Jim Fowler
|
fredfadda
Member since : Oct 16, 2003
Messages : 1
|
Oct 16, 2003 at 3:20 PM
I enconter the same problem, except that I'm trying to run the PJA ToolKitDemo on OS/390.
I tried your procedure but even with the arial.ttf placed in the JDK directory I still get the "No usable fonts found" message.
I'm not that skilled on Mainframe ; how did you put the font file on Z/OS ? binary, ASCII or EBCDIC transfer ?
Thanks a lot for your answer
About ten applications are waiting for a solution about that problem... --- Frédéric Fadda
|
Cyco Miko
Member since : Apr 13, 2004
Messages : 1
|
Apr 13, 2004 at 8:32 PM
Anybody have an answer for this yet? I'm getting the same "No usable fonts found" error. Really appreciate any insights. Thanks!!!
----------------------------------------------------------------------
> I enconter the same problem, except that I'm trying to run the PJA ToolKitDemo on OS/390.
>
> I tried your procedure but even with the arial.ttf placed in the JDK directory I still get the "No usable fonts found" message.
>
> I'm not that skilled on Mainframe ; how did you put the font file on Z/OS ? binary, ASCII or EBCDIC transfer ?
>
> Thanks a lot for your answer
>
> About ten applications are waiting for a solution about that problem...
|
ssauser
Member since : Dec 29, 2005
Messages : 2
|
Jan 4, 2006 at 10:35 PM
Making things more confusing is developing on Windows (Websphere Application Studio Developer) and deploying on Z/OS
fonts using PJAToolkit on Windows works fine, keeping in mind that font.properties always seem to be gotten from java.home + /lib/font.properties
You can fiddle around with user.home + /lib/font.properties forever but it won't make a bit of difference.
Deployed to Websphere on Z/OS, the font metrics are all set to zero using the font.properties file contained on the mainframe resulting in no output but an "blank" frame from toolkitdemo.
An experiment conducted copying the mainframe font.properties file to the Windows environment yields the same results in Websphere running on Windows. font metrics properties are all set to zero, and no output but an empty frame from the toolkitdemo.
Since the font.properties file from the mainframe is obviously one geared to a UNIX environment this makes sense on the Windows machine, but it certainly does not make any sense on the mainframe unless the PJA frames need a "window's like" font.properties file.
This would certainly explain why PJA states that the font.properties file has to be in the user.home + /lib/font.properties path, but putting it there simply does not "over ride" the java installation directory's font.properties file.
I am beginning to think that PJA and fonts and Websphere on Z/OS just do not work - does anybody think differently? --- ssauser
|