|
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:
Dialog
DialogInput
Lucida Bright
Lucida Sans
Lucida Sans Typewriter
Monospaced
Monotype Sans Duospace WT J
Monotype Sans Duospace WT K
Monotype Sans Duospace WT SC
Monotype Sans Duospace WT TC
SansSerif
Serif
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 =
GraphicsEnvironment.getLocalGraphicsEnvironment();
String envFonts[] = env.getAvailableFontFamilyNames();
System.out.println("Font Count: " + envFonts.length);
for(String font : envFonts)
System.out.println(font);
}
}
/******* 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...
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com 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.