You need to check the fonts installed on the system
It would help to know what OS release your on.
Also, within the License Pgm list, there are several that have fonts (some as part of base OS (free), some are chargeable products
Perhaps whomevere installed your system did not install all the components available.
The menu GO LICPGM and option 10 or 11 will list the products installed.
Jim Franz

----- Original Message ----- From: "Ken" <ken.mcwilliams@xxxxxxxxxx>
To: "Java400 Users" <java400-l@xxxxxxxxxxxx>
Sent: Friday, September 24, 2010 2:07 PM
Subject: Font Issue

Finally I seem to be down to the last issue (I hope) in getting my web
app working...

Right now it is an issue of the names of the installed fonts.
I can fix it in the code ( a series of xml definitions) but as I create
new reports this will become a pain.

The issue is java finds the following fonts on my iSeries:

Lucida Bright
Lucida Sans
Lucida Sans Typewriter
Monotype Sans Duospace WT J
Monotype Sans Duospace WT K
Monotype Sans Duospace WT SC
Monotype Sans Duospace WT TC
Times New Roman WT J
Times New Roman WT K
Times New Roman WT SC
Times New Roman WT TC

The issue is both Ubuntu and Windows 7 reports "Times New Roman" as just
and-not "Times New Roman [and some other junk]"

I would like it if possible to change the font name on the iSeries such
that I will not need to modify every report moved to the iSeries.
Any ideas on this, how to do it, if it's a good idea? Or should I just
bite the bullet change the xml files before running on the iSeries?

If you are curious about font names like I was this program will list
them your system (Java of course):

* Note:
* Runs on Windows 7 and Ubuntu with:
* java -jar programName.jar
* Runs on iSeries with:
* java -Djava.awt.headless=true -jar programName.jar
* further if you use iReport in your project the above java.awt.headless
must be set true in your environment or you'll get an exception.
/****** START *****/
import java.awt.GraphicsEnvironment;

public class Main{
public static void main(String[] args){
GraphicsEnvironment env =
String envFonts[] = env.getAvailableFontFamilyNames();
System.out.println("Font Count: " + envFonts.length);
for(String font : envFonts)
/******* END ******/

Finally, just a note about what I am doing...
I have a web application using Struts 2 which works fine all except for
the Jasper Reports plug in... actually I think the plugin works just
fine except that when it goes to render the report as a PDF it can't
find "Times New Roman"... *le sigh*. Also the font list sits at a
skimpy 16 fonts...

This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.