You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Matthias Schäfer <sc...@cymation.de> on 2003/09/08 12:51:46 UTC

Different VM causes different printing of Blanks in tables

Hello,

I use fop 0.20.5RC2 on a german W2K from a java-application. Printing 
text inside and outside a table shows differences on blanks. Inside the 
table the words have different distances (from normal to overlapping 
last and first letter) when running with
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cn130-20010925 (JIT 
enabled: jitc))
Running the same with
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
everything is ok.

I found the following difference between the VMs: The IBM-VM bring up 
german Buttons in JOptionPane. The SUN-VM shows english Buttons at this 
point.

So I experimented with addional "de.hyp" and "de_DR.hyp" build from 
"de.xml" and "de_DR.xml" of fop 0.20.3 and a setting of 
"hyphenation-dir" in "userconfig.xml" without success.

The System-Property "user.language" is "de" and 
"System.out.println(Locale.getDefault())" prints "de_DE".

Executing this Snippet show also no change in the described behavior.
------------------------------------------------------------
Locale.setDefault(Locale.GERMANY);
UIManager.setLookAndFeel(UIManager.getLookAndFeel()); // !!
------------------------------------------------------------

Is there anybody who can point me towards a solution where I can use the 
IBM-VM ?

Matthias



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by Clay Leeds <cl...@medata.com>.
Matthias Schäfer wrote:
> Clay Leeds wrote:
>> J.Pietschmann wrote:
>>> I never used any IBM JVM with AWT stuff, others reported this
>>> last year, look into the mailing list archives. The solutions
>>> were "upgrade" or "switch to Sun JVM" (unless on AIX, where
>>> the IBM JVM is the only viable choice).
> 
> Upgrade to ??? Is there a IBM-JVM other than 1.3.0 or 1.3.1 without that 
> problems ?

I don't know which version of AIX you're using, but IBM apparently now 
offers a Java 1.4 for AIX 5.1 & 5.2. More info can be found here:

http://www-106.ibm.com/developerworks/java/jdk/aix/index.html

NOTE: I haven't used this release (I'll be looking into whether or not 
this may be useful to us and/or our clients)

>>> If you switch to Sun's JVM: some 1.3.0 releases and basically
>>> all 1.4.0 beta releases are said to have a variety of problems
>>> with AWT text rendering, the latter most notable with
>>> character width calculations. Use 1.3.1 or 1.4.1/1.4.2.
>>> For details, consult Sun's BugParade.
>>
>> In my experience, Sun JVM 1.4.0_06 and later correctly output 
>> font-kerning using -awt (and -print, since it uses AWT). On the "IBM" 
>> side, IBM JVM 1.3.x worked OK on AIX. In fact, we've been telling our 
>> clients to use Sun Java 1.4.0_06+, or IBM Java 1.3+.
>>
>> However, since you're having problems, with IBM Java 1.3.x, I may have 
>> to revisit that advice. Out of curiosity, are all fonts affected or is 
>> it just one or two, and if so, which font(s) have you tested?
> 
> The problems occur, when I choose no font (wich seems to be Helvetica) 
> and with Helvetica. Using Courier or Times in the table-rows is ok, but 
> produces problems on my table-header. So I tested to use Helvetica on 
> table-header and Times on the rows. In this combination I see no 
> problems. Of course it is not ideal to mix fonts. Is there any other 
> font shipped with fop I can use, or is "importing" a font a solution ?

FOP's Fonts page contains much of the information I think you're looking 
for:
http://xml.apache.org/fop/fonts.html

Of particular note, is the point, that (I believe) FOP is shipped with 
no fonts. Instead, it relies on the system/renderer combination. As for 
AWT/Print, according to the chart:

====
Base-14 Fonts

The Adobe PDF Specification specifies a set of 14 fonts that must be 
available to every PDF reader: Helvetica (normal, bold, italic, bold 
italic), Times (normal, bold, italic, bold italic), Courier (normal, 
bold, italic, bold italic), Symbol and ZapfDingbats.

AWT/Operating System Fonts

The AWT family of renderers (AWT, Print, SVG), use the Java AWT 
libraries for font metric information. Through operating system 
registration, the AWT libraries know what fonts are available on the 
system, and the font metrics for each one.
====

>> FWIW, I've used Sun 1.4.1_01-b01 successfully on Win32, and as 
>> mentioned java130 on AIX. Our Linux box is using 1.4.0_02. All of 
>> these installations output "Courier" and "Times" acceptably.
>>
>> I have yet to run any tests with Sun 1.4.2...
>>
>> Hope someone finds at least a portion of this informative...

BTW, in your original msg you mentioned using fop-0.20.5rc2... Have you 
tried using the release version: fop-0.20.5 (fop-0.20.5rc2 is a few 
months old...):

http://xml.apache.org/fop/download.html

HTH!

Web Maestro Clay


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by Matthias Schäfer <sc...@cymation.de>.
Clay Leeds wrote:
> J.Pietschmann wrote:
> 
>> Matthias Schäfer wrote:
>>
>>> I guess you had problems with this in the past.
>>
>>
>> I never used any IBM JVM with AWT stuff, others reported this
>> last year, look into the mailing list archives. The solutions
>> were "upgrade" or "switch to Sun JVM" (unless on AIX, where
>> the IBM JVM is the only viable choice).
Upgrade to ??? Is there a IBM-JVM other than 1.3.0 or 1.3.1 without that 
problems ?
>>
>> If you switch to Sun's JVM: some 1.3.0 releases and basically
>> all 1.4.0 beta releases are said to have a variety of problems
>> with AWT text rendering, the latter most notable with
>> character width calculations. Use 1.3.1 or 1.4.1/1.4.2.
>> For details, consult Sun's BugParade.
> 
> 
> In my experience, Sun JVM 1.4.0_06 and later correctly output 
> font-kerning using -awt (and -print, since it uses AWT). On the "IBM" 
> side, IBM JVM 1.3.x worked OK on AIX. In fact, we've been telling our 
> clients to use Sun Java 1.4.0_06+, or IBM Java 1.3+.
> 
> However, since you're having problems, with IBM Java 1.3.x, I may have 
> to revisit that advice. Out of curiosity, are all fonts affected or is 
> it just one or two, and if so, which font(s) have you tested?
The problems occur, when I choose no font (wich seems to be Helvetica) 
and with Helvetica. Using Courier or Times in the table-rows is ok, but 
produces problems on my table-header. So I tested to use Helvetica on 
table-header and Times on the rows. In this combination I see no 
problems. Of course it is not ideal to mix fonts. Is there any other 
font shipped with fop I can use, or is "importing" a font a solution ?
> 
> FWIW, I've used Sun 1.4.1_01-b01 successfully on Win32, and as mentioned 
> java130 on AIX. Our Linux box is using 1.4.0_02. All of these 
> installations output "Courier" and "Times" acceptably.
> 
> I have yet to run any tests with Sun 1.4.2...
> 
> Hope someone finds at least a portion of this informative...
> 
> Web Maestro Clay
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by Clay Leeds <cl...@medata.com>.
J.Pietschmann wrote:
> Matthias Schäfer wrote:
> 
>> I guess you had problems with this in the past.
> 
> I never used any IBM JVM with AWT stuff, others reported this
> last year, look into the mailing list archives. The solutions
> were "upgrade" or "switch to Sun JVM" (unless on AIX, where
> the IBM JVM is the only viable choice).
> 
> If you switch to Sun's JVM: some 1.3.0 releases and basically
> all 1.4.0 beta releases are said to have a variety of problems
> with AWT text rendering, the latter most notable with
> character width calculations. Use 1.3.1 or 1.4.1/1.4.2.
> For details, consult Sun's BugParade.

In my experience, Sun JVM 1.4.0_06 and later correctly output 
font-kerning using -awt (and -print, since it uses AWT). On the "IBM" 
side, IBM JVM 1.3.x worked OK on AIX. In fact, we've been telling our 
clients to use Sun Java 1.4.0_06+, or IBM Java 1.3+.

However, since you're having problems, with IBM Java 1.3.x, I may have 
to revisit that advice. Out of curiosity, are all fonts affected or is 
it just one or two, and if so, which font(s) have you tested?

FWIW, I've used Sun 1.4.1_01-b01 successfully on Win32, and as mentioned 
java130 on AIX. Our Linux box is using 1.4.0_02. All of these 
installations output "Courier" and "Times" acceptably.

I have yet to run any tests with Sun 1.4.2...

Hope someone finds at least a portion of this informative...

Web Maestro Clay


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Matthias Schäfer wrote:
> I guess you had problems with this in the past.
I never used any IBM JVM with AWT stuff, others reported this
last year, look into the mailing list archives. The solutions
were "upgrade" or "switch to Sun JVM" (unless on AIX, where
the IBM JVM is the only viable choice).

If you switch to Sun's JVM: some 1.3.0 releases and basically
all 1.4.0 beta releases are said to have a variety of problems
with AWT text rendering, the latter most notable with
character width calculations. Use 1.3.1 or 1.4.1/1.4.2.
For details, consult Sun's BugParade.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by Matthias Schäfer <sc...@cymation.de>.
J.Pietschmann wrote:
> Matthias Schäfer wrote:
> 
>> I use fop 0.20.5RC2 on a german W2K from a java-application. Printing 
>> text inside and outside a table shows differences on blanks. Inside 
>> the table the words have different distances (from normal to 
>> overlapping last and first letter) when running with
> 
> 
> What's your output? I guess AWT?
> 
>> java version "1.3.0"
> 
> 
> That's *old* and has a huge number of known bugs, in particular
> the IBM version is known to mangle AWT text rendering. 
I guess you had problems with this in the past. How did you solve them ? 
I tried also "Classic VM (build 1.3.1, J2RE 1.3.1 IBM Windows 32 build 
cn131-20021107 (JIT enabled: jitc))" which is Part of "IBM WebSphere SDK 
for Web Services", but it shows the same effect. Is there a Patch or a 
newer Version (this is from 7.11.2002) available for the IBM-VM ?
Is there any Solution with a IBM-VM ? Can I use a Workaround ?
The Sun
> VM has its own number of problems.
> If you are tied to JDK 1.3, you should upgrade to the last patch
> level of a 1.3.1 VM.
> 
>> So I experimented with addional "de.hyp" and "de_DR.hyp" build from 
>> "de.xml" and "de_DR.xml" of fop 0.20.3 and a setting of 
>> "hyphenation-dir" in "userconfig.xml" without success.
> 
> 
> Nice try, but what kind of success did you expect? Hyphenation
> is, well, for hyphenation only, not for character placement
> calculation.
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by Matthias Schäfer <sc...@cymation.de>.
Thanks for your reply...

J.Pietschmann wrote:
> Matthias Schäfer wrote:
> 
>> I use fop 0.20.5RC2 on a german W2K from a java-application. Printing 
>> text inside and outside a table shows differences on blanks. Inside 
>> the table the words have different distances (from normal to 
>> overlapping last and first letter) when running with
> 
> 
> What's your output? I guess AWT?
Yes.
> 
>> java version "1.3.0"
> 
> 
> That's *old* and has a huge number of known bugs, in particular
> the IBM version is known to mangle AWT text rendering. 
If I know this sooner...
The Sun
> VM has its own number of problems.
> If you are tied to JDK 1.3, you should upgrade to the last patch
> level of a 1.3.1 VM.
I suggest my cosutomer to use a newer VM. If possible the latest 1.4.2.
> 
>> So I experimented with addional "de.hyp" and "de_DR.hyp" build from 
>> "de.xml" and "de_DR.xml" of fop 0.20.3 and a setting of 
>> "hyphenation-dir" in "userconfig.xml" without success.
> 
> 
> Nice try, but what kind of success did you expect? Hyphenation
> is, well, for hyphenation only, not for character placement
> calculation.
Your right, but while I guess it was dependet on the language of the VM 
I try this.
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Different VM causes different printing of Blanks in tables

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Matthias Schäfer wrote:
> I use fop 0.20.5RC2 on a german W2K from a java-application. Printing 
> text inside and outside a table shows differences on blanks. Inside the 
> table the words have different distances (from normal to overlapping 
> last and first letter) when running with

What's your output? I guess AWT?

> java version "1.3.0"

That's *old* and has a huge number of known bugs, in particular
the IBM version is known to mangle AWT text rendering. The Sun
VM has its own number of problems.
If you are tied to JDK 1.3, you should upgrade to the last patch
level of a 1.3.1 VM.

> So I experimented with addional "de.hyp" and "de_DR.hyp" build from 
> "de.xml" and "de_DR.xml" of fop 0.20.3 and a setting of 
> "hyphenation-dir" in "userconfig.xml" without success.

Nice try, but what kind of success did you expect? Hyphenation
is, well, for hyphenation only, not for character placement
calculation.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org