Apply this patch to:
xml-fop/src/org/apache/fop/layout/LineArea.java
A bug was introduced between version 1.42 and 1.43 of LineArea
which uses a lot of mapChar to cope with bug 1618 (CVS log has
a typo error instead to "1681"), and forgot to change the
leader calculation.
This bug should have caused FOP to crash with any XSL:FO input
that has a leader with dots or space with non-pdf-standard
fonts. I wonder why nobody spotted it in release 0.19? My
last CVS build was May 16 and it worked fine - the fatal bug
was introduced on 12 June and went into release 0.19 and
went unreported for nearly a month...
Somebody please patch this into the CVS tree?
=============================================================
*** LineArea.java-bad Tue Jun 12 12:37:42 2001
--- LineArea.java Wed Jul 4 00:44:44 2001
***************
*** 751,769 ****
* creates a leader as String out of the given char and the leader
length
* and wraps it in an InlineArea which is returned
*/
! private InlineArea buildSimpleLeader(int charNumber, int leaderLength) {
! int width = this.currentFontState.width(charNumber);
if (width == 0) {
- char c = (char) charNumber;
MessageHandler.errorln("char " + c + " has width
0. Using width 100 instead.");
width = 100;
}
int factor = (int) Math.floor (leaderLength /
width);
char [] leaderChars = new char [factor];
- char fillChar = (char) charNumber;
for (int i = 0; i < factor; i ++) {
! leaderChars[i] = fillChar;
}
WordArea leaderPatternArea =
new WordArea(currentFontState, this.red, this.green,
--- 751,767 ----
* creates a leader as String out of the given char and the leader
length
* and wraps it in an InlineArea which is returned
*/
! private InlineArea buildSimpleLeader(char c, int leaderLength) {
! int width =
this.currentFontState.width(currentFontState.mapChar(c));
if (width == 0) {
MessageHandler.errorln("char " + c + " has width
0. Using width 100 instead.");
width = 100;
}
int factor = (int) Math.floor (leaderLength /
width);
char [] leaderChars = new char [factor];
for (int i = 0; i < factor; i ++) {
! leaderChars[i] = c;
}
WordArea leaderPatternArea =
new WordArea(currentFontState, this.red, this.green,
==============================
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]